2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 11:13:58 +08:00

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

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

Fixes: a912b54d3a ("f2fs: split bio cache")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Christophe JAILLET 2017-06-11 09:21:11 +02:00 committed by Jaegeuk Kim
parent a005774c8d
commit b63def9112

View File

@ -1977,8 +1977,10 @@ try_onemore:
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);