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

Commit 13240c90 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: clean up error path of fill_super



This patch cleans up error path of fille_super to avoid unneeded
release step.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 2e5c39e5
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2663,14 +2663,14 @@ try_onemore:

	err = init_percpu_info(sbi);
	if (err)
		goto free_options;
		goto free_bio_info;

	if (F2FS_IO_SIZE(sbi) > 1) {
		sbi->write_io_dummy =
			mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0);
		if (!sbi->write_io_dummy) {
			err = -ENOMEM;
			goto free_options;
			goto free_percpu;
		}
	}

@@ -2903,10 +2903,12 @@ free_meta_inode:
free_io_dummy:
	if (sbi->write_io_dummy)
		mempool_destroy(sbi->write_io_dummy);
free_options:
free_percpu:
	destroy_percpu_info(sbi);
free_bio_info:
	for (i = 0; i < NR_PAGE_TYPE; i++)
		kfree(sbi->write_io[i]);
	destroy_percpu_info(sbi);
free_options:
#ifdef CONFIG_QUOTA
	for (i = 0; i < F2FS_MAXQUOTAS; i++)
		kfree(sbi->s_qf_names[i]);