aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-01-17 03:31:35 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-22 17:56:50 -0500
commitd7997e63684c98d93defac0c99f589778bc71869 (patch)
treee8403c4726967e6d72448373b387955d30bbbf4a
parenta9d572c7550044d5b217b5287d99a2e6d34b97b0 (diff)
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: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/super.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 2bfd09812d2a..8173ae688814 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2604,14 +2604,14 @@ try_onemore:
2604 2604
2605 err = init_percpu_info(sbi); 2605 err = init_percpu_info(sbi);
2606 if (err) 2606 if (err)
2607 goto free_options; 2607 goto free_bio_info;
2608 2608
2609 if (F2FS_IO_SIZE(sbi) > 1) { 2609 if (F2FS_IO_SIZE(sbi) > 1) {
2610 sbi->write_io_dummy = 2610 sbi->write_io_dummy =
2611 mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0); 2611 mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0);
2612 if (!sbi->write_io_dummy) { 2612 if (!sbi->write_io_dummy) {
2613 err = -ENOMEM; 2613 err = -ENOMEM;
2614 goto free_options; 2614 goto free_percpu;
2615 } 2615 }
2616 } 2616 }
2617 2617
@@ -2843,10 +2843,12 @@ free_meta_inode:
2843 iput(sbi->meta_inode); 2843 iput(sbi->meta_inode);
2844free_io_dummy: 2844free_io_dummy:
2845 mempool_destroy(sbi->write_io_dummy); 2845 mempool_destroy(sbi->write_io_dummy);
2846free_options: 2846free_percpu:
2847 destroy_percpu_info(sbi);
2848free_bio_info:
2847 for (i = 0; i < NR_PAGE_TYPE; i++) 2849 for (i = 0; i < NR_PAGE_TYPE; i++)
2848 kfree(sbi->write_io[i]); 2850 kfree(sbi->write_io[i]);
2849 destroy_percpu_info(sbi); 2851free_options:
2850#ifdef CONFIG_QUOTA 2852#ifdef CONFIG_QUOTA
2851 for (i = 0; i < MAXQUOTAS; i++) 2853 for (i = 0; i < MAXQUOTAS; i++)
2852 kfree(sbi->s_qf_names[i]); 2854 kfree(sbi->s_qf_names[i]);