diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-20 11:13:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:40 -0500 |
commit | 197b12d6796a3bca187f22a8978a33d51e2bcd79 (patch) | |
tree | 706ff3454f03d4aa8ca4d76010479d7f9d2b36f4 /fs | |
parent | c10997f6575f476ff38442fa18fd4a0d80345f9d (diff) |
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/configfs/mount.c | 6 | ||||
-rw-r--r-- | fs/debugfs/inode.c | 4 | ||||
-rw-r--r-- | fs/dlm/lockspace.c | 4 | ||||
-rw-r--r-- | fs/ecryptfs/main.c | 4 | ||||
-rw-r--r-- | fs/fuse/inode.c | 6 | ||||
-rw-r--r-- | fs/gfs2/locking/dlm/sysfs.c | 2 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 4 | ||||
-rw-r--r-- | fs/partitions/check.c | 6 |
8 files changed, 18 insertions, 18 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 54bf0db0d4b0..de3b31d0a37d 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -150,7 +150,7 @@ static int __init configfs_init(void) | |||
150 | err = register_filesystem(&configfs_fs_type); | 150 | err = register_filesystem(&configfs_fs_type); |
151 | if (err) { | 151 | if (err) { |
152 | printk(KERN_ERR "configfs: Unable to register filesystem!\n"); | 152 | printk(KERN_ERR "configfs: Unable to register filesystem!\n"); |
153 | kobject_unregister(config_kobj); | 153 | kobject_put(config_kobj); |
154 | kmem_cache_destroy(configfs_dir_cachep); | 154 | kmem_cache_destroy(configfs_dir_cachep); |
155 | configfs_dir_cachep = NULL; | 155 | configfs_dir_cachep = NULL; |
156 | goto out; | 156 | goto out; |
@@ -159,7 +159,7 @@ static int __init configfs_init(void) | |||
159 | err = configfs_inode_init(); | 159 | err = configfs_inode_init(); |
160 | if (err) { | 160 | if (err) { |
161 | unregister_filesystem(&configfs_fs_type); | 161 | unregister_filesystem(&configfs_fs_type); |
162 | kobject_unregister(config_kobj); | 162 | kobject_put(config_kobj); |
163 | kmem_cache_destroy(configfs_dir_cachep); | 163 | kmem_cache_destroy(configfs_dir_cachep); |
164 | configfs_dir_cachep = NULL; | 164 | configfs_dir_cachep = NULL; |
165 | } | 165 | } |
@@ -170,7 +170,7 @@ out: | |||
170 | static void __exit configfs_exit(void) | 170 | static void __exit configfs_exit(void) |
171 | { | 171 | { |
172 | unregister_filesystem(&configfs_fs_type); | 172 | unregister_filesystem(&configfs_fs_type); |
173 | kobject_unregister(config_kobj); | 173 | kobject_put(config_kobj); |
174 | kmem_cache_destroy(configfs_dir_cachep); | 174 | kmem_cache_destroy(configfs_dir_cachep); |
175 | configfs_dir_cachep = NULL; | 175 | configfs_dir_cachep = NULL; |
176 | configfs_inode_exit(); | 176 | configfs_inode_exit(); |
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 97f6381c36c2..d26e2826ba5b 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -438,7 +438,7 @@ static int __init debugfs_init(void) | |||
438 | 438 | ||
439 | retval = register_filesystem(&debug_fs_type); | 439 | retval = register_filesystem(&debug_fs_type); |
440 | if (retval) | 440 | if (retval) |
441 | kobject_unregister(debug_kobj); | 441 | kobject_put(debug_kobj); |
442 | return retval; | 442 | return retval; |
443 | } | 443 | } |
444 | 444 | ||
@@ -446,7 +446,7 @@ static void __exit debugfs_exit(void) | |||
446 | { | 446 | { |
447 | simple_release_fs(&debugfs_mount, &debugfs_mount_count); | 447 | simple_release_fs(&debugfs_mount, &debugfs_mount_count); |
448 | unregister_filesystem(&debug_fs_type); | 448 | unregister_filesystem(&debug_fs_type); |
449 | kobject_unregister(debug_kobj); | 449 | kobject_put(debug_kobj); |
450 | } | 450 | } |
451 | 451 | ||
452 | core_initcall(debugfs_init); | 452 | core_initcall(debugfs_init); |
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index b750f13d0328..5c108c49cb8c 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -579,7 +579,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace, | |||
579 | kfree(ls->ls_rsbtbl); | 579 | kfree(ls->ls_rsbtbl); |
580 | out_lsfree: | 580 | out_lsfree: |
581 | if (do_unreg) | 581 | if (do_unreg) |
582 | kobject_unregister(&ls->ls_kobj); | 582 | kobject_put(&ls->ls_kobj); |
583 | else | 583 | else |
584 | kfree(ls); | 584 | kfree(ls); |
585 | out: | 585 | out: |
@@ -728,7 +728,7 @@ static int release_lockspace(struct dlm_ls *ls, int force) | |||
728 | dlm_clear_members(ls); | 728 | dlm_clear_members(ls); |
729 | dlm_clear_members_gone(ls); | 729 | dlm_clear_members_gone(ls); |
730 | kfree(ls->ls_node_array); | 730 | kfree(ls->ls_node_array); |
731 | kobject_unregister(&ls->ls_kobj); | 731 | kobject_put(&ls->ls_kobj); |
732 | /* The ls structure will be freed when the kobject is done with */ | 732 | /* The ls structure will be freed when the kobject is done with */ |
733 | 733 | ||
734 | mutex_lock(&ls_lock); | 734 | mutex_lock(&ls_lock); |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 4f1332107bbd..0249aa4ae181 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -767,7 +767,7 @@ static int do_sysfs_registration(void) | |||
767 | if (rc) { | 767 | if (rc) { |
768 | printk(KERN_ERR | 768 | printk(KERN_ERR |
769 | "Unable to create ecryptfs version attributes\n"); | 769 | "Unable to create ecryptfs version attributes\n"); |
770 | kobject_unregister(ecryptfs_kobj); | 770 | kobject_put(ecryptfs_kobj); |
771 | } | 771 | } |
772 | out: | 772 | out: |
773 | return rc; | 773 | return rc; |
@@ -776,7 +776,7 @@ out: | |||
776 | static void do_sysfs_unregistration(void) | 776 | static void do_sysfs_unregistration(void) |
777 | { | 777 | { |
778 | sysfs_remove_group(ecryptfs_kobj, &attr_group); | 778 | sysfs_remove_group(ecryptfs_kobj, &attr_group); |
779 | kobject_unregister(ecryptfs_kobj); | 779 | kobject_put(ecryptfs_kobj); |
780 | } | 780 | } |
781 | 781 | ||
782 | static int __init ecryptfs_init(void) | 782 | static int __init ecryptfs_init(void) |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index e6e23a2ad4b3..e5e80d1a4687 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -810,15 +810,15 @@ static int fuse_sysfs_init(void) | |||
810 | return 0; | 810 | return 0; |
811 | 811 | ||
812 | out_fuse_unregister: | 812 | out_fuse_unregister: |
813 | kobject_unregister(fuse_kobj); | 813 | kobject_put(fuse_kobj); |
814 | out_err: | 814 | out_err: |
815 | return err; | 815 | return err; |
816 | } | 816 | } |
817 | 817 | ||
818 | static void fuse_sysfs_cleanup(void) | 818 | static void fuse_sysfs_cleanup(void) |
819 | { | 819 | { |
820 | kobject_unregister(connections_kobj); | 820 | kobject_put(connections_kobj); |
821 | kobject_unregister(fuse_kobj); | 821 | kobject_put(fuse_kobj); |
822 | } | 822 | } |
823 | 823 | ||
824 | static int __init fuse_init(void) | 824 | static int __init fuse_init(void) |
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c index a7336b909c61..a87b09839761 100644 --- a/fs/gfs2/locking/dlm/sysfs.c +++ b/fs/gfs2/locking/dlm/sysfs.c | |||
@@ -207,7 +207,7 @@ int gdlm_kobject_setup(struct gdlm_ls *ls, struct kobject *fskobj) | |||
207 | 207 | ||
208 | void gdlm_kobject_release(struct gdlm_ls *ls) | 208 | void gdlm_kobject_release(struct gdlm_ls *ls) |
209 | { | 209 | { |
210 | kobject_unregister(&ls->kobj); | 210 | kobject_put(&ls->kobj); |
211 | } | 211 | } |
212 | 212 | ||
213 | int gdlm_sysfs_init(void) | 213 | int gdlm_sysfs_init(void) |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 8d9cd5bd5845..3a3176b846f3 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -525,7 +525,7 @@ fail_counters: | |||
525 | fail_lockstruct: | 525 | fail_lockstruct: |
526 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); | 526 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); |
527 | fail_reg: | 527 | fail_reg: |
528 | kobject_unregister(&sdp->sd_kobj); | 528 | kobject_put(&sdp->sd_kobj); |
529 | fail: | 529 | fail: |
530 | fs_err(sdp, "error %d adding sysfs files", error); | 530 | fs_err(sdp, "error %d adding sysfs files", error); |
531 | return error; | 531 | return error; |
@@ -537,7 +537,7 @@ void gfs2_sys_fs_del(struct gfs2_sbd *sdp) | |||
537 | sysfs_remove_group(&sdp->sd_kobj, &args_group); | 537 | sysfs_remove_group(&sdp->sd_kobj, &args_group); |
538 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); | 538 | sysfs_remove_group(&sdp->sd_kobj, &counters_group); |
539 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); | 539 | sysfs_remove_group(&sdp->sd_kobj, &lockstruct_group); |
540 | kobject_unregister(&sdp->sd_kobj); | 540 | kobject_put(&sdp->sd_kobj); |
541 | } | 541 | } |
542 | 542 | ||
543 | int gfs2_sys_init(void) | 543 | int gfs2_sys_init(void) |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 97f3f5f064ee..739da701ae7b 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -314,7 +314,7 @@ void delete_partition(struct gendisk *disk, int part) | |||
314 | p->nr_sects = 0; | 314 | p->nr_sects = 0; |
315 | p->ios[0] = p->ios[1] = 0; | 315 | p->ios[0] = p->ios[1] = 0; |
316 | p->sectors[0] = p->sectors[1] = 0; | 316 | p->sectors[0] = p->sectors[1] = 0; |
317 | kobject_unregister(p->holder_dir); | 317 | kobject_put(p->holder_dir); |
318 | device_del(&p->dev); | 318 | device_del(&p->dev); |
319 | put_device(&p->dev); | 319 | put_device(&p->dev); |
320 | } | 320 | } |
@@ -505,8 +505,8 @@ void del_gendisk(struct gendisk *disk) | |||
505 | disk_stat_set_all(disk, 0); | 505 | disk_stat_set_all(disk, 0); |
506 | disk->stamp = 0; | 506 | disk->stamp = 0; |
507 | 507 | ||
508 | kobject_unregister(disk->holder_dir); | 508 | kobject_put(disk->holder_dir); |
509 | kobject_unregister(disk->slave_dir); | 509 | kobject_put(disk->slave_dir); |
510 | disk->driverfs_dev = NULL; | 510 | disk->driverfs_dev = NULL; |
511 | #ifndef CONFIG_SYSFS_DEPRECATED | 511 | #ifndef CONFIG_SYSFS_DEPRECATED |
512 | sysfs_remove_link(block_depr, disk->dev.bus_id); | 512 | sysfs_remove_link(block_depr, disk->dev.bus_id); |