]> err.no Git - linux-2.6/commitdiff
Kobject: convert fs/* from kobject_unregister() to kobject_put()
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Dec 2007 16:13:05 +0000 (08:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:40 +0000 (20:40 -0800)
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/configfs/mount.c
fs/debugfs/inode.c
fs/dlm/lockspace.c
fs/ecryptfs/main.c
fs/fuse/inode.c
fs/gfs2/locking/dlm/sysfs.c
fs/gfs2/sys.c
fs/partitions/check.c

index 54bf0db0d4b07c9c69e7432dc5aeb55f3555f1f5..de3b31d0a37d88a44185cb6be1efeefed6bc1cab 100644 (file)
@@ -150,7 +150,7 @@ static int __init configfs_init(void)
        err = register_filesystem(&configfs_fs_type);
        if (err) {
                printk(KERN_ERR "configfs: Unable to register filesystem!\n");
-               kobject_unregister(config_kobj);
+               kobject_put(config_kobj);
                kmem_cache_destroy(configfs_dir_cachep);
                configfs_dir_cachep = NULL;
                goto out;
@@ -159,7 +159,7 @@ static int __init configfs_init(void)
        err = configfs_inode_init();
        if (err) {
                unregister_filesystem(&configfs_fs_type);
-               kobject_unregister(config_kobj);
+               kobject_put(config_kobj);
                kmem_cache_destroy(configfs_dir_cachep);
                configfs_dir_cachep = NULL;
        }
@@ -170,7 +170,7 @@ out:
 static void __exit configfs_exit(void)
 {
        unregister_filesystem(&configfs_fs_type);
-       kobject_unregister(config_kobj);
+       kobject_put(config_kobj);
        kmem_cache_destroy(configfs_dir_cachep);
        configfs_dir_cachep = NULL;
        configfs_inode_exit();
index 97f6381c36c228ad2d727dff4b9a3ea5bca12db7..d26e2826ba5b8242ec3a4ad1bcf3b849d64b5a8a 100644 (file)
@@ -438,7 +438,7 @@ static int __init debugfs_init(void)
 
        retval = register_filesystem(&debug_fs_type);
        if (retval)
-               kobject_unregister(debug_kobj);
+               kobject_put(debug_kobj);
        return retval;
 }
 
@@ -446,7 +446,7 @@ static void __exit debugfs_exit(void)
 {
        simple_release_fs(&debugfs_mount, &debugfs_mount_count);
        unregister_filesystem(&debug_fs_type);
-       kobject_unregister(debug_kobj);
+       kobject_put(debug_kobj);
 }
 
 core_initcall(debugfs_init);
index b750f13d03281aab016545cc80929b32216db283..5c108c49cb8cd30128d533630cdd3ac72810839d 100644 (file)
@@ -579,7 +579,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
        kfree(ls->ls_rsbtbl);
  out_lsfree:
        if (do_unreg)
-               kobject_unregister(&ls->ls_kobj);
+               kobject_put(&ls->ls_kobj);
        else
                kfree(ls);
  out:
@@ -728,7 +728,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
        dlm_clear_members(ls);
        dlm_clear_members_gone(ls);
        kfree(ls->ls_node_array);
-       kobject_unregister(&ls->ls_kobj);
+       kobject_put(&ls->ls_kobj);
        /* The ls structure will be freed when the kobject is done with */
 
        mutex_lock(&ls_lock);
index 4f1332107bbd1b119cacfaa222653e92a582b25c..0249aa4ae181886cd2a26921a465feb5f8d27d41 100644 (file)
@@ -767,7 +767,7 @@ static int do_sysfs_registration(void)
        if (rc) {
                printk(KERN_ERR
                       "Unable to create ecryptfs version attributes\n");
-               kobject_unregister(ecryptfs_kobj);
+               kobject_put(ecryptfs_kobj);
        }
 out:
        return rc;
@@ -776,7 +776,7 @@ out:
 static void do_sysfs_unregistration(void)
 {
        sysfs_remove_group(ecryptfs_kobj, &attr_group);
-       kobject_unregister(ecryptfs_kobj);
+       kobject_put(ecryptfs_kobj);
 }
 
 static int __init ecryptfs_init(void)
index e6e23a2ad4b3a2557d9afd23d76c363b0237fe1d..e5e80d1a46870dda75135efca29c793860164b15 100644 (file)
@@ -810,15 +810,15 @@ static int fuse_sysfs_init(void)
        return 0;
 
  out_fuse_unregister:
-       kobject_unregister(fuse_kobj);
+       kobject_put(fuse_kobj);
  out_err:
        return err;
 }
 
 static void fuse_sysfs_cleanup(void)
 {
-       kobject_unregister(connections_kobj);
-       kobject_unregister(fuse_kobj);
+       kobject_put(connections_kobj);
+       kobject_put(fuse_kobj);
 }
 
 static int __init fuse_init(void)
index a7336b909c61730432184e3fa622fa4130474066..a87b098397617cdc82a4fc1ebe0eb9edb121a7c0 100644 (file)
@@ -207,7 +207,7 @@ int gdlm_kobject_setup(struct gdlm_ls *ls, struct kobject *fskobj)
 
 void gdlm_kobject_release(struct gdlm_ls *ls)
 {
-       kobject_unregister(&ls->kobj);
+       kobject_put(&ls->kobj);
 }
 
 int gdlm_sysfs_init(void)
index 8d9cd5bd58452e13246b0365e27a356f8b2428da..3a3176b846f360b1916b94a85bfc55cd26b03f28 100644 (file)
@@ -525,7 +525,7 @@ fail_counters:
 fail_lockstruct:
        sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group);
 fail_reg:
-       kobject_unregister(&sdp->sd_kobj);
+       kobject_put(&sdp->sd_kobj);
 fail:
        fs_err(sdp, "error %d adding sysfs files", error);
        return error;
@@ -537,7 +537,7 @@ void gfs2_sys_fs_del(struct gfs2_sbd *sdp)
        sysfs_remove_group(&sdp->sd_kobj, &args_group);
        sysfs_remove_group(&sdp->sd_kobj, &counters_group);
        sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group);
-       kobject_unregister(&sdp->sd_kobj);
+       kobject_put(&sdp->sd_kobj);
 }
 
 int gfs2_sys_init(void)
index 97f3f5f064ee2442c9c360e759bdcc9b46c75655..739da701ae7b8fec52d10f48392a85509208e286 100644 (file)
@@ -314,7 +314,7 @@ void delete_partition(struct gendisk *disk, int part)
        p->nr_sects = 0;
        p->ios[0] = p->ios[1] = 0;
        p->sectors[0] = p->sectors[1] = 0;
-       kobject_unregister(p->holder_dir);
+       kobject_put(p->holder_dir);
        device_del(&p->dev);
        put_device(&p->dev);
 }
@@ -505,8 +505,8 @@ void del_gendisk(struct gendisk *disk)
        disk_stat_set_all(disk, 0);
        disk->stamp = 0;
 
-       kobject_unregister(disk->holder_dir);
-       kobject_unregister(disk->slave_dir);
+       kobject_put(disk->holder_dir);
+       kobject_put(disk->slave_dir);
        disk->driverfs_dev = NULL;
 #ifndef CONFIG_SYSFS_DEPRECATED
        sysfs_remove_link(block_depr, disk->dev.bus_id);