Commit 197b12d6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Kobject: convert fs/* from kobject_unregister() to kobject_put()



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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c10997f6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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();
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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)
+3 −3
Original line number Diff line number Diff line
@@ -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)
Loading