]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add btrfs_sysfs_remove_device helper
authorAnand Jain <anand.jain@oracle.com>
Fri, 4 Sep 2020 17:34:24 +0000 (01:34 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:21 +0000 (12:12 +0200)
commit5cdc5704e4f5a7a46c52acaa097999a464e93ec8
tree687acf4771f9d3794a809674dcade8aeb3e3aef5
parentb937b357f096e74802564657a1a1d48e93826536
btrfs: add btrfs_sysfs_remove_device helper

btrfs_sysfs_remove_devices_dir() removes device link and devid kobject
(sysfs entries) for a device or all the devices in the btrfs_fs_devices.
In preparation to remove these sysfs entries for the seed as well, add
a btrfs_sysfs_remove_device() helper function and avoid code
duplication.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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>
fs/btrfs/sysfs.c