From: Christophe JAILLET Date: Sun, 11 Jun 2017 07:21:11 +0000 (+0200) Subject: f2fs: Fix a return value in case of error in 'f2fs_fill_super' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b63def9112cd8b91477a06ba5318c8a01ac474f1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: Fix a return value in case of error in 'f2fs_fill_super' err must be set to -ENOMEM, otherwise we return 0. Fixes: a912b54d3aaa0 ("f2fs: split bio cache") Signed-off-by: Christophe JAILLET Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index ddd2973ffcbf..fe86a7edfa60 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1977,8 +1977,10 @@ try_onemore: sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info), GFP_KERNEL); - if (!sbi->write_io[i]) + if (!sbi->write_io[i]) { + err = -ENOMEM; goto free_options; + } for (j = HOT; j < n; j++) { init_rwsem(&sbi->write_io[i][j].io_rwsem);