Commit 14bdb047 authored by Damien Le Moal's avatar Damien Le Moal

zonefs: Fix zonefs_init_file_inode() return value

Commit 87c9ce3f ("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: 87c9ce3f ("zonefs: Add active seq file accounting")
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 143a6252
......@@ -1373,7 +1373,7 @@ static int zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone,
struct super_block *sb = inode->i_sb;
struct zonefs_sb_info *sbi = ZONEFS_SB(sb);
struct zonefs_inode_info *zi = ZONEFS_I(inode);
int ret;
int ret = 0;
inode->i_ino = zone->start >> sbi->s_zone_sectors_shift;
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,
unlock:
mutex_unlock(&zi->i_truncate_mutex);
return 0;
return ret;
}
static struct dentry *zonefs_create_inode(struct dentry *parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment