diff options
author | Anand Jain <Anand.Jain@oracle.com> | 2014-08-13 02:24:24 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:38:10 -0400 |
commit | b2efedca68c15bc6eab6cbe0756f90c3b8f23b8f (patch) | |
tree | 81d71226c36220a6961bd1488c0058da2a8bdd18 /fs | |
parent | 8bef8401a04ae1937f3330484c2d7a8c6b9b9897 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 94a0d186de4c..8482396056ee 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1832,7 +1832,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, | |||
1832 | fs_devices->num_devices--; | 1832 | fs_devices->num_devices--; |
1833 | if (srcdev->missing) { | 1833 | if (srcdev->missing) { |
1834 | fs_devices->missing_devices--; | 1834 | fs_devices->missing_devices--; |
1835 | fs_devices->rw_devices++; | 1835 | if (!fs_devices->seeding) |
1836 | fs_devices->rw_devices++; | ||
1836 | } | 1837 | } |
1837 | if (srcdev->can_discard) | 1838 | if (srcdev->can_discard) |
1838 | fs_devices->num_can_discard--; | 1839 | fs_devices->num_can_discard--; |