diff options
author | Tiezhu Yang <kernelpatch@126.com> | 2016-05-18 08:02:25 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-18 13:57:31 -0700 |
commit | b8bef79df709533416a278c4c3aef3577cefa61a (patch) | |
tree | f4984ce26b77d0ea10d614f7554674efd15028b8 /fs/f2fs | |
parent | 513c5f3735a9bd0bd8b58b6cdafbad5ef19f2159 (diff) | |
download | linux-b8bef79df709533416a278c4c3aef3577cefa61a.tar.bz2 |
f2fs: make exit_f2fs_fs more clear
init_f2fs_fs does:
1) f2fs_build_trace_ios
2) init_inodecache
3) create_node_manager_caches
4) create_segment_manager_caches
5) create_checkpoint_caches
6) create_extent_cache
7) kset_create_and_add
8) kobject_init_and_add
9) register_shrinker
10) register_filesystem
11) f2fs_create_root_stats
12) proc_mkdir
exit_f2fs_fs should do cleanup in the reverse order
to make the code more clear.
Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 173cf3a1c29d..74cc8520b8b1 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1926,17 +1926,17 @@ static void __exit exit_f2fs_fs(void) { remove_proc_entry("fs/f2fs", NULL); f2fs_destroy_root_stats(); - unregister_shrinker(&f2fs_shrinker_info); unregister_filesystem(&f2fs_fs_type); + unregister_shrinker(&f2fs_shrinker_info); +#ifdef CONFIG_F2FS_FAULT_INJECTION + kobject_put(&f2fs_fault_inject); +#endif + kset_unregister(f2fs_kset); destroy_extent_cache(); destroy_checkpoint_caches(); destroy_segment_manager_caches(); destroy_node_manager_caches(); destroy_inodecache(); -#ifdef CONFIG_F2FS_FAULT_INJECTION - kobject_put(&f2fs_fault_inject); -#endif - kset_unregister(f2fs_kset); f2fs_destroy_trace_ios(); } |