]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Btrfs: sysfs: add support to add parent for fsid
authorAnand Jain <anand.jain@oracle.com>
Mon, 9 Mar 2015 22:38:39 +0000 (06:38 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 27 May 2015 10:27:22 +0000 (12:27 +0200)
To support seed sysfs layout and represent seed fsid under
the sprout we need the facility to create fsid under the
specified parent.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/sysfs.c

index b35366c88d3dd53d084d6e5003d83b3d24ce9838..ea81a057c79b98798a454bfbbf93bc50fb39c724 100644 (file)
@@ -729,8 +729,8 @@ int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs,
 
        init_completion(&fs_devs->kobj_unregister);
        fs_devs->super_kobj.kset = btrfs_kset;
-       error = kobject_init_and_add(&fs_devs->super_kobj, &btrfs_ktype, NULL,
-                                    "%pU", fs_devs->fsid);
+       error = kobject_init_and_add(&fs_devs->super_kobj,
+                               &btrfs_ktype, parent, "%pU", fs_devs->fsid);
        return error;
 }