kobject: convert main fs kobject to use kobject_create
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Oct 2007 20:17:23 +0000 (14:17 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:13 +0000 (20:40 -0800)
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>
fs/ecryptfs/main.c
fs/fuse/inode.c
fs/gfs2/sys.c
fs/namespace.c
include/linux/fs.h

index 4750d82c3db942301fd84fa84473e1ef246aaae1..bdeac3877a84f01dd56c029519ba501138469eb5 100644 (file)
@@ -798,7 +798,7 @@ static int do_sysfs_registration(void)
 {
        int rc;
 
-       ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, &fs_subsys.kobj);
+       ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, fs_kobj);
        if (!ecryptfs_kset) {
                printk(KERN_ERR "Unable to create ecryptfs kset\n");
                rc = -ENOMEM;
index 92118066f1d67a11e18c0f3e69a24b0b9cc0f6bc..e6e23a2ad4b3a2557d9afd23d76c363b0237fe1d 100644 (file)
@@ -795,7 +795,7 @@ static int fuse_sysfs_init(void)
 {
        int err;
 
-       fuse_kobj = kobject_create_and_add("fuse", &fs_subsys.kobj);
+       fuse_kobj = kobject_create_and_add("fuse", fs_kobj);
        if (!fuse_kobj) {
                err = -ENOMEM;
                goto out_err;
index d7fa54443f0cf32c24b3d09f8ae4a2b746f1b9cc..a0bdc4a3acf91f5ec1e3fbbe0345497245156bcf 100644 (file)
@@ -549,7 +549,7 @@ int gfs2_sys_init(void)
        gfs2_sys_margs = NULL;
        spin_lock_init(&gfs2_sys_margs_lock);
        kobject_set_name(&gfs2_kset.kobj, "gfs2");
-       gfs2_kset.kobj.kset = &fs_subsys;
+       gfs2_kset.kobj.parent = fs_kobj;
        return kset_register(&gfs2_kset);
 }
 
index a4a3f70e7e26ffea481c1832db3eac1a00523dbb..61bf376e29e85bfda2456cb929c0a0eeb38af1b3 100644 (file)
@@ -41,8 +41,8 @@ static struct kmem_cache *mnt_cache __read_mostly;
 static struct rw_semaphore namespace_sem;
 
 /* /sys/fs */
-decl_subsys(fs, NULL);
-EXPORT_SYMBOL_GPL(fs_subsys);
+struct kobject *fs_kobj;
+EXPORT_SYMBOL_GPL(fs_kobj);
 
 static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
 {
@@ -1861,10 +1861,9 @@ void __init mnt_init(void)
        if (err)
                printk(KERN_WARNING "%s: sysfs_init error: %d\n",
                        __FUNCTION__, err);
-       err = subsystem_register(&fs_subsys);
-       if (err)
-               printk(KERN_WARNING "%s: subsystem_register error: %d\n",
-                       __FUNCTION__, err);
+       fs_kobj = kobject_create_and_add("fs", NULL);
+       if (!fs_kobj)
+               printk(KERN_WARNING "%s: kobj create error\n", __FUNCTION__);
        init_rootfs();
        init_mount_tree();
 }
index b3ec4a496d64faa3a380827abed7b54d9d8bd7da..21398a5d688d3e188325822c781ae19e8c67d6b9 100644 (file)
@@ -1476,7 +1476,7 @@ extern void drop_collected_mounts(struct vfsmount *);
 extern int vfs_statfs(struct dentry *, struct kstatfs *);
 
 /* /sys/fs */
-extern struct kset fs_subsys;
+extern struct kobject *fs_kobj;
 
 #define FLOCK_VERIFY_READ  1
 #define FLOCK_VERIFY_WRITE 2