aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fscache/main.c')
-rw-r--r--fs/fscache/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fscache/main.c b/fs/fscache/main.c
index 7c734b7fb18e..c2f3e637725d 100644
--- a/fs/fscache/main.c
+++ b/fs/fscache/main.c
@@ -56,9 +56,15 @@ static int __init fscache_init(void)
56 if (ret < 0) 56 if (ret < 0)
57 goto error_proc; 57 goto error_proc;
58 58
59 fscache_root = kobject_create_and_add("fscache", kernel_kobj);
60 if (!fscache_root)
61 goto error_kobj;
62
59 printk(KERN_NOTICE "FS-Cache: Loaded\n"); 63 printk(KERN_NOTICE "FS-Cache: Loaded\n");
60 return 0; 64 return 0;
61 65
66error_kobj:
67 fscache_proc_cleanup();
62error_proc: 68error_proc:
63 slow_work_unregister_user(); 69 slow_work_unregister_user();
64error_slow_work: 70error_slow_work:
@@ -74,6 +80,7 @@ static void __exit fscache_exit(void)
74{ 80{
75 _enter(""); 81 _enter("");
76 82
83 kobject_put(fscache_root);
77 fscache_proc_cleanup(); 84 fscache_proc_cleanup();
78 slow_work_unregister_user(); 85 slow_work_unregister_user();
79 printk(KERN_NOTICE "FS-Cache: Unloaded\n"); 86 printk(KERN_NOTICE "FS-Cache: Unloaded\n");