Re: [PATCH 03/11] btrfs: refactor btrfs_sysfs_remove_devices_dir

Anand Jain
2020-08-31T09:15:10Z

On 31/8/20 4:58 pm, Nikolay Borisov wrote:
>
>
> On 30.08.20 г. 17:40 ч., Anand Jain wrote:
>> Similar to btrfs_sysfs_add_devices_dir() refactor, refactor
>> btrfs_sysfs_remove_devices_dir() so that we don't have to use the 2nd
>> argument to indicate whether to free all devices or just one device. So
>> this patch also adds a bit of cleanups and return value is dropped to
>> void.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>
> <snip>
>
>> -/* when 2nd argument device is NULL, it removes all devices link */
>> -int btrfs_sysfs_remove_devices_dir(struct btrfs_fs_devices *fs_devices,
>> - struct btrfs_device *device)
>> +void btrfs_sysfs_remove_fs_devices(struct btrfs_fs_devices *fs_devices)
>> {
>> + struct btrfs_device *device;
>> struct btrfs_fs_devices *seed_fs_devices;
>>
>> - if (device) {
>> - btrfs_sysfs_remove_device(device);
>> - return 0;
>> - }
>
> What branch is this based off of ? Because I don't see
> btrfs_sysfs_remove_device function at all ?

btrfs_sysfs_remove_device() is added in the patch 1/11 in this set.
Anyways this is based on misc-next last commit 381ebd340264.

>
> <snip>
>