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.j...@oracle.com>
---
 fs/btrfs/volumes.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 314bbbf..bf99e82 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1977,7 +1977,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info 
*fs_info,
        fs_devices->num_devices--;
        if (srcdev->missing) {
                fs_devices->missing_devices--;
-               fs_devices->rw_devices++;
+               if (!fs_devices->seeding)
+                       fs_devices->rw_devices++;
        }
        if (srcdev->can_discard)
                fs_devices->num_can_discard--;
-- 
2.0.0.153.g79dcccc

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to