summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-04-12 20:52:35 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-09 09:14:41 +0200
commit051e78dc1f97e3af8a5929e9c3ea744633785b1b (patch)
treecddd2950aaff32334ae896213889d09487a70a45 /fs
parent534c3f29acdda03bc0e50f1e6c9526252cb93d07 (diff)
zonefs: Clear inode information flags on inode creation
commit 694852ead287a3433126e7ebda397b242dc99624 upstream. 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> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/zonefs/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index 1e0def61beb0..b34ccfd71b0f 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -1155,6 +1155,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;
}