Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8d27efa authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jaegeuk Kim
Browse files

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



commit b63def9112cd8b91477a06ba5318c8a01ac474f1 upstream.

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

Fixes: a912b54d3aaa0 ("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 33b58b6d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1971,8 +1971,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);