linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: linux-fsdevel@vger.kernel.org
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v2 1/8] zonefs: Clear inode information flags on inode creation
Date: Wed, 20 Apr 2022 11:35:38 +0900	[thread overview]
Message-ID: <20220420023545.3814998-2-damien.lemoal@opensource.wdc.com> (raw)
In-Reply-To: <20220420023545.3814998-1-damien.lemoal@opensource.wdc.com>

Ensure that the i_flags field of struct zonefs_inode_info is cleared to
0 when initializing a zone file inode, avoiding seeing the flag
ZONEFS_ZONE_OPEN being incorrectly set.

Fixes: b5c00e975779 ("zonefs: open/close zone on file open/close")
Cc: <stable@vger.kernel.org>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/zonefs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index 3614c7834007..75d8dabe0807 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -1142,6 +1142,7 @@ static struct inode *zonefs_alloc_inode(struct super_block *sb)
 	inode_init_once(&zi->i_vnode);
 	mutex_init(&zi->i_truncate_mutex);
 	zi->i_wr_refcnt = 0;
+	zi->i_flags = 0;
 
 	return &zi->i_vnode;
 }
-- 
2.35.1


  reply	other threads:[~2022-04-20  2:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  2:35 [PATCH v2 0/8] zonefs improvements Damien Le Moal
2022-04-20  2:35 ` Damien Le Moal [this message]
2022-04-20  3:58   ` [PATCH v2 1/8] zonefs: Clear inode information flags on inode creation Chaitanya Kulkarni
2022-04-20  8:40   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 2/8] zonefs: Fix management of open zones Damien Le Moal
2022-04-20  8:44   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 3/8] zonefs: Rename super block information fields Damien Le Moal
2022-04-20 10:48   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 4/8] zonefs: Always do seq file write open accounting Damien Le Moal
2022-04-20 10:49   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 5/8] zonefs: Export open zone resource information through sysfs Damien Le Moal
2022-04-20 10:52   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 6/8] zonefs: Add active seq file accounting Damien Le Moal
2022-04-20  7:50   ` Johannes Thumshirn
2022-04-20 10:54   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 7/8] documentation: zonefs: Cleanup the mount options section Damien Le Moal
2022-04-20 10:57   ` Hans Holmberg
2022-04-20  2:35 ` [PATCH v2 8/8] documentation: zonefs: Document sysfs attributes Damien Le Moal
2022-04-20 10:57   ` Hans Holmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220420023545.3814998-2-damien.lemoal@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).