Commit c6761a9e authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: sysfs, btrfs_sysfs_add_fsid() drop unused argument parent

Commit 24bd69cb ("Btrfs: sysfs: add support to add parent for fsid")
added parent argument in preparation to show the seed fsid under the
sprout fsid as in the patch [1] in the mailing list.

 [1] Btrfs: sysfs: support seed devices in the sysfs layout

But later this idea was superseded by another idea to rename the fsid as
in the commit f93c3997 ("btrfs: factor out sysfs code for updating
sprout fsid").

So we don't need parent argument anymore.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent b5501504
...@@ -3082,7 +3082,7 @@ int __cold open_ctree(struct super_block *sb, ...@@ -3082,7 +3082,7 @@ int __cold open_ctree(struct super_block *sb,
btrfs_free_extra_devids(fs_devices, 1); btrfs_free_extra_devids(fs_devices, 1);
ret = btrfs_sysfs_add_fsid(fs_devices, NULL); ret = btrfs_sysfs_add_fsid(fs_devices);
if (ret) { if (ret) {
btrfs_err(fs_info, "failed to init sysfs fsid interface: %d", btrfs_err(fs_info, "failed to init sysfs fsid interface: %d",
ret); ret);
......
...@@ -1065,18 +1065,19 @@ void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices, ...@@ -1065,18 +1065,19 @@ void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices,
static struct kset *btrfs_kset; static struct kset *btrfs_kset;
/* /*
* Creates:
* /sys/fs/btrfs/UUID
*
* Can be called by the device discovery thread. * Can be called by the device discovery thread.
* And parent can be specified for seed device
*/ */
int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs)
struct kobject *parent)
{ {
int error; int error;
init_completion(&fs_devs->kobj_unregister); init_completion(&fs_devs->kobj_unregister);
fs_devs->fsid_kobj.kset = btrfs_kset; fs_devs->fsid_kobj.kset = btrfs_kset;
error = kobject_init_and_add(&fs_devs->fsid_kobj, error = kobject_init_and_add(&fs_devs->fsid_kobj, &btrfs_ktype, NULL,
&btrfs_ktype, parent, "%pU", fs_devs->fsid); "%pU", fs_devs->fsid);
if (error) { if (error) {
kobject_put(&fs_devs->fsid_kobj); kobject_put(&fs_devs->fsid_kobj);
return error; return error;
......
...@@ -18,9 +18,8 @@ int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices, ...@@ -18,9 +18,8 @@ int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device); struct btrfs_device *one_device);
int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices, int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device); struct btrfs_device *one_device);
int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs);
struct kobject *parent); int btrfs_sysfs_add_devices_kobj(struct btrfs_fs_devices *fs_devs);
int btrfs_sysfs_add_device(struct btrfs_fs_devices *fs_devs);
void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs); void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs);
void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices, void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices,
const u8 *fsid); const u8 *fsid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment