summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-09-03 21:35:44 +0800
committerChris Mason <clm@fb.com>2014-09-17 13:38:46 -0700
commit82372bc816d75722c24d1abadb11cd8c0a33883a (patch)
tree25b4d0d6425c2a2d11fc557813599227064fa32f /fs/btrfs/dev-replace.c
parent67a2c45ee7f4f250458279a2e1244679c5d9735c (diff)
downloadop-kernel-dev-82372bc816d75722c24d1abadb11cd8c0a33883a.zip
op-kernel-dev-82372bc816d75722c24d1abadb11cd8c0a33883a.tar.gz
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>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index e9cbbdb..6f662b3 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -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);
OpenPOWER on IntegriCloud