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;
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;
}
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();
retval = register_filesystem(&debug_fs_type);
if (retval)
- kobject_unregister(debug_kobj);
+ kobject_put(debug_kobj);
return retval;
}
{
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);
kfree(ls->ls_rsbtbl);
out_lsfree:
if (do_unreg)
- kobject_unregister(&ls->ls_kobj);
+ kobject_put(&ls->ls_kobj);
else
kfree(ls);
out:
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);
if (rc) {
printk(KERN_ERR
"Unable to create ecryptfs version attributes\n");
- kobject_unregister(ecryptfs_kobj);
+ kobject_put(ecryptfs_kobj);
}
out:
return rc;
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)
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)
void gdlm_kobject_release(struct gdlm_ls *ls)
{
- kobject_unregister(&ls->kobj);
+ kobject_put(&ls->kobj);
}
int gdlm_sysfs_init(void)
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;
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)
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);
}
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);