Skip to content

Commit

Permalink
zonefs: Clear inode information flags on inode creation
Browse files Browse the repository at this point in the history
commit 694852e 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Damien Le Moal authored and gregkh committed May 9, 2022
1 parent e63193b commit 3ebe57c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/zonefs/super.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3ebe57c

Please sign in to comment.