diff options
author | Anand Jain <anand.jain@oracle.com> | 2020-09-04 19:34:27 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:12:21 +0200 |
commit | 53f8a74cbeffd45a95de5dc6d16584aadb682a31 (patch) | |
tree | 527a8f65ac82d8db75c2c52e7cf0b3c5c711871d /fs/btrfs/dev-replace.c | |
parent | btrfs: simplify parameters of btrfs_sysfs_add_devices_dir (diff) | |
download | linux-53f8a74cbeffd45a95de5dc6d16584aadb682a31.tar.xz linux-53f8a74cbeffd45a95de5dc6d16584aadb682a31.zip |
btrfs: split and refactor btrfs_sysfs_remove_devices_dir
Similar to btrfs_sysfs_add_devices_dir()'s refactoring, split
btrfs_sysfs_remove_devices_dir() so that we don't have to use the device
argument to indicate whether to free all devices or just one device.
Export btrfs_sysfs_remove_device() as device operations outside of
sysfs.c now calls this instead of btrfs_sysfs_remove_devices_dir().
btrfs_sysfs_remove_devices_dir() is renamed to
btrfs_sysfs_remove_fs_devices() to suite its new role.
Now, no one outside of sysfs.c calls btrfs_sysfs_remove_fs_devices()
so it is redeclared s static. And the same function had to be moved
before its first caller.
Reviewed-by: Nikolay Borisov <nborisov@suse.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>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r-- | fs/btrfs/dev-replace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index c176375c2c02..db4d4a53ab73 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -781,7 +781,7 @@ error: mutex_unlock(&fs_info->fs_devices->device_list_mutex); /* replace the sysfs entry */ - btrfs_sysfs_remove_devices_dir(fs_info->fs_devices, src_device); + btrfs_sysfs_remove_device(src_device); btrfs_sysfs_update_devid(tgt_device); if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &src_device->dev_state)) btrfs_scratch_superblocks(fs_info, src_device->bdev, |