mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: simplify parameters of btrfs_sysfs_add_devices_dir
When we add a device we need to add it to sysfs, so instead of using the btrfs_sysfs_add_devices_dir() fs_devices argument to specify whether to add a device or all of fs_devices, call the helper function directly btrfs_sysfs_add_device() and thus make it non-static. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6a416a018f
commit
cd36da2e7e
4 changed files with 7 additions and 11 deletions
|
@ -512,7 +512,7 @@ static int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
|
|||
atomic64_set(&dev_replace->num_uncorrectable_read_errors, 0);
|
||||
up_write(&dev_replace->rwsem);
|
||||
|
||||
ret = btrfs_sysfs_add_devices_dir(tgt_device->fs_devices, tgt_device);
|
||||
ret = btrfs_sysfs_add_device(tgt_device);
|
||||
if (ret)
|
||||
btrfs_err(fs_info, "kobj add dev failed %d", ret);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue