diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-29 16:17:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:13 -0500 |
commit | 00d2666623368ffd39afc875ff8a2eead2a0436c (patch) | |
tree | 9b16b85167f1bd86c02c0ebeb74510d8029783a3 /fs | |
parent | 917e865df7eb020f20ffc2b4204f282a587df94f (diff) |
kobject: convert main fs kobject to use kobject_create
This also renames fs_subsys to fs_kobj to catch all current users with a
build error instead of a build warning which can easily be missed.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/main.c | 2 | ||||
-rw-r--r-- | fs/fuse/inode.c | 2 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 2 | ||||
-rw-r--r-- | fs/namespace.c | 11 |
4 files changed, 8 insertions, 9 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 4750d82c3db9..bdeac3877a84 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -798,7 +798,7 @@ static int do_sysfs_registration(void) | |||
798 | { | 798 | { |
799 | int rc; | 799 | int rc; |
800 | 800 | ||
801 | ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, &fs_subsys.kobj); | 801 | ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, fs_kobj); |
802 | if (!ecryptfs_kset) { | 802 | if (!ecryptfs_kset) { |
803 | printk(KERN_ERR "Unable to create ecryptfs kset\n"); | 803 | printk(KERN_ERR "Unable to create ecryptfs kset\n"); |
804 | rc = -ENOMEM; | 804 | rc = -ENOMEM; |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 92118066f1d6..e6e23a2ad4b3 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -795,7 +795,7 @@ static int fuse_sysfs_init(void) | |||
795 | { | 795 | { |
796 | int err; | 796 | int err; |
797 | 797 | ||
798 | fuse_kobj = kobject_create_and_add("fuse", &fs_subsys.kobj); | 798 | fuse_kobj = kobject_create_and_add("fuse", fs_kobj); |
799 | if (!fuse_kobj) { | 799 | if (!fuse_kobj) { |
800 | err = -ENOMEM; | 800 | err = -ENOMEM; |
801 | goto out_err; | 801 | goto out_err; |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index d7fa54443f0c..a0bdc4a3acf9 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -549,7 +549,7 @@ int gfs2_sys_init(void) | |||
549 | gfs2_sys_margs = NULL; | 549 | gfs2_sys_margs = NULL; |
550 | spin_lock_init(&gfs2_sys_margs_lock); | 550 | spin_lock_init(&gfs2_sys_margs_lock); |
551 | kobject_set_name(&gfs2_kset.kobj, "gfs2"); | 551 | kobject_set_name(&gfs2_kset.kobj, "gfs2"); |
552 | gfs2_kset.kobj.kset = &fs_subsys; | 552 | gfs2_kset.kobj.parent = fs_kobj; |
553 | return kset_register(&gfs2_kset); | 553 | return kset_register(&gfs2_kset); |
554 | } | 554 | } |
555 | 555 | ||
diff --git a/fs/namespace.c b/fs/namespace.c index a4a3f70e7e26..61bf376e29e8 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -41,8 +41,8 @@ static struct kmem_cache *mnt_cache __read_mostly; | |||
41 | static struct rw_semaphore namespace_sem; | 41 | static struct rw_semaphore namespace_sem; |
42 | 42 | ||
43 | /* /sys/fs */ | 43 | /* /sys/fs */ |
44 | decl_subsys(fs, NULL); | 44 | struct kobject *fs_kobj; |
45 | EXPORT_SYMBOL_GPL(fs_subsys); | 45 | EXPORT_SYMBOL_GPL(fs_kobj); |
46 | 46 | ||
47 | static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) | 47 | static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) |
48 | { | 48 | { |
@@ -1861,10 +1861,9 @@ void __init mnt_init(void) | |||
1861 | if (err) | 1861 | if (err) |
1862 | printk(KERN_WARNING "%s: sysfs_init error: %d\n", | 1862 | printk(KERN_WARNING "%s: sysfs_init error: %d\n", |
1863 | __FUNCTION__, err); | 1863 | __FUNCTION__, err); |
1864 | err = subsystem_register(&fs_subsys); | 1864 | fs_kobj = kobject_create_and_add("fs", NULL); |
1865 | if (err) | 1865 | if (!fs_kobj) |
1866 | printk(KERN_WARNING "%s: subsystem_register error: %d\n", | 1866 | printk(KERN_WARNING "%s: kobj create error\n", __FUNCTION__); |
1867 | __FUNCTION__, err); | ||
1868 | init_rootfs(); | 1867 | init_rootfs(); |
1869 | init_mount_tree(); | 1868 | init_mount_tree(); |
1870 | } | 1869 | } |