mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
btrfs: rw_devices shouldn't be incremented for seed fs in btrfs_rm_dev_replace_srcdev()
seed fs devices don't participate as rw_device, so don't increment rw_devices when the device being handled belongs to a seed fs. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
8bef8401a0
commit
b2efedca68
1 changed files with 2 additions and 1 deletions
|
@ -1832,6 +1832,7 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info,
|
|||
fs_devices->num_devices--;
|
||||
if (srcdev->missing) {
|
||||
fs_devices->missing_devices--;
|
||||
if (!fs_devices->seeding)
|
||||
fs_devices->rw_devices++;
|
||||
}
|
||||
if (srcdev->can_discard)
|
||||
|
|
Loading…
Reference in a new issue