diff options
Diffstat (limited to 'fs/configfs/mount.c')
-rw-r--r-- | fs/configfs/mount.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 871b0cb61839..3bf0278ea843 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -154,8 +154,16 @@ static int __init configfs_init(void) | |||
154 | subsystem_unregister(&config_subsys); | 154 | subsystem_unregister(&config_subsys); |
155 | kmem_cache_destroy(configfs_dir_cachep); | 155 | kmem_cache_destroy(configfs_dir_cachep); |
156 | configfs_dir_cachep = NULL; | 156 | configfs_dir_cachep = NULL; |
157 | goto out; | ||
157 | } | 158 | } |
158 | 159 | ||
160 | err = configfs_inode_init(); | ||
161 | if (err) { | ||
162 | unregister_filesystem(&configfs_fs_type); | ||
163 | subsystem_unregister(&config_subsys); | ||
164 | kmem_cache_destroy(configfs_dir_cachep); | ||
165 | configfs_dir_cachep = NULL; | ||
166 | } | ||
159 | out: | 167 | out: |
160 | return err; | 168 | return err; |
161 | } | 169 | } |
@@ -166,6 +174,7 @@ static void __exit configfs_exit(void) | |||
166 | subsystem_unregister(&config_subsys); | 174 | subsystem_unregister(&config_subsys); |
167 | kmem_cache_destroy(configfs_dir_cachep); | 175 | kmem_cache_destroy(configfs_dir_cachep); |
168 | configfs_dir_cachep = NULL; | 176 | configfs_dir_cachep = NULL; |
177 | configfs_inode_exit(); | ||
169 | } | 178 | } |
170 | 179 | ||
171 | MODULE_AUTHOR("Oracle"); | 180 | MODULE_AUTHOR("Oracle"); |