Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2efedca authored by Anand Jain's avatar Anand Jain Committed by Chris Mason
Browse files

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: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 8bef8401
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1832,6 +1832,7 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info,
	fs_devices->num_devices--;
	fs_devices->num_devices--;
	if (srcdev->missing) {
	if (srcdev->missing) {
		fs_devices->missing_devices--;
		fs_devices->missing_devices--;
		if (!fs_devices->seeding)
			fs_devices->rw_devices++;
			fs_devices->rw_devices++;
	}
	}
	if (srcdev->can_discard)
	if (srcdev->can_discard)