Commit b63def91 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jaegeuk Kim

f2fs: Fix a return value in case of error in 'f2fs_fill_super'

err must be set to -ENOMEM, otherwise we return 0.

Fixes: a912b54d ("f2fs: split bio cache")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent a005774c
...@@ -1977,8 +1977,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -1977,8 +1977,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info), sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info),
GFP_KERNEL); GFP_KERNEL);
if (!sbi->write_io[i]) if (!sbi->write_io[i]) {
err = -ENOMEM;
goto free_options; goto free_options;
}
for (j = HOT; j < n; j++) { for (j = HOT; j < n; j++) {
init_rwsem(&sbi->write_io[i][j].io_rwsem); init_rwsem(&sbi->write_io[i][j].io_rwsem);
......
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