mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
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>
This commit is contained in:
parent
917e865df7
commit
00d2666623
5 changed files with 9 additions and 10 deletions
|
@ -798,7 +798,7 @@ static int do_sysfs_registration(void)
|
||||||
{
|
{
|
||||||
int rc;
|
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) {
|
if (!ecryptfs_kset) {
|
||||||
printk(KERN_ERR "Unable to create ecryptfs kset\n");
|
printk(KERN_ERR "Unable to create ecryptfs kset\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
|
|
|
@ -795,7 +795,7 @@ static int fuse_sysfs_init(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
fuse_kobj = kobject_create_and_add("fuse", &fs_subsys.kobj);
|
fuse_kobj = kobject_create_and_add("fuse", fs_kobj);
|
||||||
if (!fuse_kobj) {
|
if (!fuse_kobj) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
|
@ -549,7 +549,7 @@ int gfs2_sys_init(void)
|
||||||
gfs2_sys_margs = NULL;
|
gfs2_sys_margs = NULL;
|
||||||
spin_lock_init(&gfs2_sys_margs_lock);
|
spin_lock_init(&gfs2_sys_margs_lock);
|
||||||
kobject_set_name(&gfs2_kset.kobj, "gfs2");
|
kobject_set_name(&gfs2_kset.kobj, "gfs2");
|
||||||
gfs2_kset.kobj.kset = &fs_subsys;
|
gfs2_kset.kobj.parent = fs_kobj;
|
||||||
return kset_register(&gfs2_kset);
|
return kset_register(&gfs2_kset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ static struct kmem_cache *mnt_cache __read_mostly;
|
||||||
static struct rw_semaphore namespace_sem;
|
static struct rw_semaphore namespace_sem;
|
||||||
|
|
||||||
/* /sys/fs */
|
/* /sys/fs */
|
||||||
decl_subsys(fs, NULL);
|
struct kobject *fs_kobj;
|
||||||
EXPORT_SYMBOL_GPL(fs_subsys);
|
EXPORT_SYMBOL_GPL(fs_kobj);
|
||||||
|
|
||||||
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
|
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
|
||||||
{
|
{
|
||||||
|
@ -1861,10 +1861,9 @@ void __init mnt_init(void)
|
||||||
if (err)
|
if (err)
|
||||||
printk(KERN_WARNING "%s: sysfs_init error: %d\n",
|
printk(KERN_WARNING "%s: sysfs_init error: %d\n",
|
||||||
__FUNCTION__, err);
|
__FUNCTION__, err);
|
||||||
err = subsystem_register(&fs_subsys);
|
fs_kobj = kobject_create_and_add("fs", NULL);
|
||||||
if (err)
|
if (!fs_kobj)
|
||||||
printk(KERN_WARNING "%s: subsystem_register error: %d\n",
|
printk(KERN_WARNING "%s: kobj create error\n", __FUNCTION__);
|
||||||
__FUNCTION__, err);
|
|
||||||
init_rootfs();
|
init_rootfs();
|
||||||
init_mount_tree();
|
init_mount_tree();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1476,7 +1476,7 @@ extern void drop_collected_mounts(struct vfsmount *);
|
||||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||||
|
|
||||||
/* /sys/fs */
|
/* /sys/fs */
|
||||||
extern struct kset fs_subsys;
|
extern struct kobject *fs_kobj;
|
||||||
|
|
||||||
#define FLOCK_VERIFY_READ 1
|
#define FLOCK_VERIFY_READ 1
|
||||||
#define FLOCK_VERIFY_WRITE 2
|
#define FLOCK_VERIFY_WRITE 2
|
||||||
|
|
Loading…
Reference in a new issue