X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fconfigfs%2Fmount.c;h=de3b31d0a37d88a44185cb6be1efeefed6bc1cab;hb=989b0b930218661b504bbb056b309e2c7bcdfb86;hp=871b0cb618399223e3e500cae1a46b54c42475b9;hpb=22aadf8a07067644e101267ed5003043f2ad05bf;p=~andy%2Flinux diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 871b0cb6183..de3b31d0a37 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c @@ -128,7 +128,7 @@ void configfs_release_fs(void) } -static decl_subsys(config, NULL, NULL); +static struct kobject *config_kobj; static int __init configfs_init(void) { @@ -140,9 +140,8 @@ static int __init configfs_init(void) if (!configfs_dir_cachep) goto out; - kobj_set_kset_s(&config_subsys, kernel_subsys); - err = subsystem_register(&config_subsys); - if (err) { + config_kobj = kobject_create_and_add("config", kernel_kobj); + if (!config_kobj) { kmem_cache_destroy(configfs_dir_cachep); configfs_dir_cachep = NULL; goto out; @@ -151,11 +150,19 @@ static int __init configfs_init(void) err = register_filesystem(&configfs_fs_type); if (err) { printk(KERN_ERR "configfs: Unable to register filesystem!\n"); - subsystem_unregister(&config_subsys); + kobject_put(config_kobj); kmem_cache_destroy(configfs_dir_cachep); configfs_dir_cachep = NULL; + goto out; } + err = configfs_inode_init(); + if (err) { + unregister_filesystem(&configfs_fs_type); + kobject_put(config_kobj); + kmem_cache_destroy(configfs_dir_cachep); + configfs_dir_cachep = NULL; + } out: return err; } @@ -163,9 +170,10 @@ out: static void __exit configfs_exit(void) { unregister_filesystem(&configfs_fs_type); - subsystem_unregister(&config_subsys); + kobject_put(config_kobj); kmem_cache_destroy(configfs_dir_cachep); configfs_dir_cachep = NULL; + configfs_inode_exit(); } MODULE_AUTHOR("Oracle");