aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Le Moal <[email protected]>2022-04-12 20:52:35 +0900
committerDamien Le Moal <[email protected]>2022-04-21 08:37:23 +0900
commitb954ebba296bb2eb2e38322f17aaa6426934bd7e (patch)
treeac452185c39a2c8b23b0f8aec40e3dbdd39966ff
parentb2d229d4ddb17db541098b83524d901257e93845 (diff)
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: b5c00e975779 ("zonefs: open/close zone on file open/close") Cc: <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Hans Holmberg <[email protected]>
-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 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;
}