summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-10-29 23:17:23 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-25 07:40:13 +0300
commit00d2666623368ffd39afc875ff8a2eead2a0436c (patch)
tree9b16b85167f1bd86c02c0ebeb74510d8029783a3
parent917e865df7eb020f20ffc2b4204f282a587df94f (diff)
downloadlinux-00d2666623368ffd39afc875ff8a2eead2a0436c.tar.xz
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>
-rw-r--r--fs/ecryptfs/main.c2
-rw-r--r--fs/fuse/inode.c2
-rw-r--r--fs/gfs2/sys.c2
-rw-r--r--fs/namespace.c11
-rw-r--r--include/linux/fs.h2
5 files changed, 9 insertions, 10 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)
{
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;
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)
{
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;
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)
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);
}
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;
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();
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b3ec4a496d64..21398a5d688d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -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