aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index ad44822059c7..2dbaa4fc2cbb 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1258,6 +1258,10 @@ static int mount_ubifs(struct ubifs_info *c)
1258 } 1258 }
1259 } 1259 }
1260 1260
1261 err = dbg_debugfs_init_fs(c);
1262 if (err)
1263 goto out_infos;
1264
1261 err = dbg_check_filesystem(c); 1265 err = dbg_check_filesystem(c);
1262 if (err) 1266 if (err)
1263 goto out_infos; 1267 goto out_infos;
@@ -1369,6 +1373,7 @@ static void ubifs_umount(struct ubifs_info *c)
1369 dbg_gen("un-mounting UBI device %d, volume %d", c->vi.ubi_num, 1373 dbg_gen("un-mounting UBI device %d, volume %d", c->vi.ubi_num,
1370 c->vi.vol_id); 1374 c->vi.vol_id);
1371 1375
1376 dbg_debugfs_exit_fs(c);
1372 spin_lock(&ubifs_infos_lock); 1377 spin_lock(&ubifs_infos_lock);
1373 list_del(&c->infos_list); 1378 list_del(&c->infos_list);
1374 spin_unlock(&ubifs_infos_lock); 1379 spin_unlock(&ubifs_infos_lock);
@@ -2079,11 +2084,17 @@ static int __init ubifs_init(void)
2079 2084
2080 err = ubifs_compressors_init(); 2085 err = ubifs_compressors_init();
2081 if (err) 2086 if (err)
2087 goto out_shrinker;
2088
2089 err = dbg_debugfs_init();
2090 if (err)
2082 goto out_compr; 2091 goto out_compr;
2083 2092
2084 return 0; 2093 return 0;
2085 2094
2086out_compr: 2095out_compr:
2096 ubifs_compressors_exit();
2097out_shrinker:
2087 unregister_shrinker(&ubifs_shrinker_info); 2098 unregister_shrinker(&ubifs_shrinker_info);
2088 kmem_cache_destroy(ubifs_inode_slab); 2099 kmem_cache_destroy(ubifs_inode_slab);
2089out_reg: 2100out_reg:
@@ -2098,6 +2109,7 @@ static void __exit ubifs_exit(void)
2098 ubifs_assert(list_empty(&ubifs_infos)); 2109 ubifs_assert(list_empty(&ubifs_infos));
2099 ubifs_assert(atomic_long_read(&ubifs_clean_zn_cnt) == 0); 2110 ubifs_assert(atomic_long_read(&ubifs_clean_zn_cnt) == 0);
2100 2111
2112 dbg_debugfs_exit();
2101 ubifs_compressors_exit(); 2113 ubifs_compressors_exit();
2102 unregister_shrinker(&ubifs_shrinker_info); 2114 unregister_shrinker(&ubifs_shrinker_info);
2103 kmem_cache_destroy(ubifs_inode_slab); 2115 kmem_cache_destroy(ubifs_inode_slab);