mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
Btrfs: make the logic of source device removing more clear
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
67a2c45ee7
commit
82372bc816
2 changed files with 8 additions and 14 deletions
|
@ -569,8 +569,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
|
|||
if (fs_info->fs_devices->latest_bdev == src_device->bdev)
|
||||
fs_info->fs_devices->latest_bdev = tgt_device->bdev;
|
||||
list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list);
|
||||
if (src_device->fs_devices->seeding)
|
||||
fs_info->fs_devices->rw_devices++;
|
||||
fs_info->fs_devices->rw_devices++;
|
||||
|
||||
/* replace the sysfs entry */
|
||||
btrfs_kobj_rm_device(fs_info, src_device);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue