Skip to content

Commit 694852e

Browse files
author
Damien Le Moal
committed
zonefs: Clear inode information flags on inode creation
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: b5c00e9 ("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>
1 parent b2d229d commit 694852e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/zonefs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ static struct inode *zonefs_alloc_inode(struct super_block *sb)
11421142
inode_init_once(&zi->i_vnode);
11431143
mutex_init(&zi->i_truncate_mutex);
11441144
zi->i_wr_refcnt = 0;
1145+
zi->i_flags = 0;
11451146

11461147
return &zi->i_vnode;
11471148
}

0 commit comments

Comments
 (0)