diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-09-03 09:35:44 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:38:46 -0400 |
commit | 82372bc816d75722c24d1abadb11cd8c0a33883a (patch) | |
tree | 25b4d0d6425c2a2d11fc557813599227064fa32f /fs/btrfs/dev-replace.c | |
parent | 67a2c45ee7f4f250458279a2e1244679c5d9735c (diff) |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index e9cbbdb72978..6f662b34ba0e 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, | |||
569 | if (fs_info->fs_devices->latest_bdev == src_device->bdev) | 569 | if (fs_info->fs_devices->latest_bdev == src_device->bdev) |
570 | fs_info->fs_devices->latest_bdev = tgt_device->bdev; | 570 | fs_info->fs_devices->latest_bdev = tgt_device->bdev; |
571 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); | 571 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); |
572 | if (src_device->fs_devices->seeding) | 572 | fs_info->fs_devices->rw_devices++; |
573 | fs_info->fs_devices->rw_devices++; | ||
574 | 573 | ||
575 | /* replace the sysfs entry */ | 574 | /* replace the sysfs entry */ |
576 | btrfs_kobj_rm_device(fs_info, src_device); | 575 | btrfs_kobj_rm_device(fs_info, src_device); |