Skip to content

Commit 14bdb04

Browse files
author
Damien Le Moal
committed
zonefs: Fix zonefs_init_file_inode() return value
Commit 87c9ce3 ("zonefs: Add active seq file accounting") wrongly changed zonefs_init_file_inode() to always return 0 even if the call to zonefs_zone_mgmt() fails. Fix this by propagating zonefs_zone_mgmt() return value as the return value for zonefs_init_file_inode(). Fixes: 87c9ce3 ("zonefs: Add active seq file accounting") Signed-off-by: Damien Le Moal <[email protected]>
1 parent 143a625 commit 14bdb04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/zonefs/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ static int zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
13731373
struct super_block *sb = inode->i_sb;
13741374
struct zonefs_sb_info *sbi = ZONEFS_SB(sb);
13751375
struct zonefs_inode_info *zi = ZONEFS_I(inode);
1376-
int ret;
1376+
int ret = 0;
13771377

13781378
inode->i_ino = zone->start >> sbi->s_zone_sectors_shift;
13791379
inode->i_mode = S_IFREG | sbi->s_perm;
@@ -1420,7 +1420,7 @@ static int zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
14201420
unlock:
14211421
mutex_unlock(&zi->i_truncate_mutex);
14221422

1423-
return 0;
1423+
return ret;
14241424
}
14251425

14261426
static struct dentry *zonefs_create_inode(struct dentry *parent,

0 commit comments

Comments
 (0)