diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/configfs/mount.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 374ddbd6648d..13300466464b 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -128,7 +128,7 @@ void configfs_release_fs(void) | |||
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
131 | static decl_subsys(config, NULL); | 131 | static struct kobject *config_kobj; |
132 | 132 | ||
133 | static int __init configfs_init(void) | 133 | static int __init configfs_init(void) |
134 | { | 134 | { |
@@ -140,9 +140,8 @@ static int __init configfs_init(void) | |||
140 | if (!configfs_dir_cachep) | 140 | if (!configfs_dir_cachep) |
141 | goto out; | 141 | goto out; |
142 | 142 | ||
143 | config_subsys.kobj.kset = &kernel_subsys; | 143 | config_kobj = kobject_create_and_add("config", &kernel_subsys.kobj); |
144 | err = subsystem_register(&config_subsys); | 144 | if (!config_kobj) { |
145 | if (err) { | ||
146 | kmem_cache_destroy(configfs_dir_cachep); | 145 | kmem_cache_destroy(configfs_dir_cachep); |
147 | configfs_dir_cachep = NULL; | 146 | configfs_dir_cachep = NULL; |
148 | goto out; | 147 | goto out; |
@@ -151,7 +150,7 @@ static int __init configfs_init(void) | |||
151 | err = register_filesystem(&configfs_fs_type); | 150 | err = register_filesystem(&configfs_fs_type); |
152 | if (err) { | 151 | if (err) { |
153 | printk(KERN_ERR "configfs: Unable to register filesystem!\n"); | 152 | printk(KERN_ERR "configfs: Unable to register filesystem!\n"); |
154 | subsystem_unregister(&config_subsys); | 153 | kobject_unregister(config_kobj); |
155 | kmem_cache_destroy(configfs_dir_cachep); | 154 | kmem_cache_destroy(configfs_dir_cachep); |
156 | configfs_dir_cachep = NULL; | 155 | configfs_dir_cachep = NULL; |
157 | goto out; | 156 | goto out; |
@@ -160,7 +159,7 @@ static int __init configfs_init(void) | |||
160 | err = configfs_inode_init(); | 159 | err = configfs_inode_init(); |
161 | if (err) { | 160 | if (err) { |
162 | unregister_filesystem(&configfs_fs_type); | 161 | unregister_filesystem(&configfs_fs_type); |
163 | subsystem_unregister(&config_subsys); | 162 | kobject_unregister(config_kobj); |
164 | kmem_cache_destroy(configfs_dir_cachep); | 163 | kmem_cache_destroy(configfs_dir_cachep); |
165 | configfs_dir_cachep = NULL; | 164 | configfs_dir_cachep = NULL; |
166 | } | 165 | } |
@@ -171,7 +170,7 @@ out: | |||
171 | static void __exit configfs_exit(void) | 170 | static void __exit configfs_exit(void) |
172 | { | 171 | { |
173 | unregister_filesystem(&configfs_fs_type); | 172 | unregister_filesystem(&configfs_fs_type); |
174 | subsystem_unregister(&config_subsys); | 173 | kobject_unregister(config_kobj); |
175 | kmem_cache_destroy(configfs_dir_cachep); | 174 | kmem_cache_destroy(configfs_dir_cachep); |
176 | configfs_dir_cachep = NULL; | 175 | configfs_dir_cachep = NULL; |
177 | configfs_inode_exit(); | 176 | configfs_inode_exit(); |