|
@@ -666,7 +666,8 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
|
|
if (device->bdev)
|
|
if (device->bdev)
|
|
fs_devices->open_devices--;
|
|
fs_devices->open_devices--;
|
|
|
|
|
|
- if (device->writeable && !device->is_tgtdev_for_dev_replace) {
|
|
|
|
|
|
+ if (device->writeable &&
|
|
|
|
+ device->devid != BTRFS_DEV_REPLACE_DEVID) {
|
|
list_del_init(&device->dev_alloc_list);
|
|
list_del_init(&device->dev_alloc_list);
|
|
fs_devices->rw_devices--;
|
|
fs_devices->rw_devices--;
|
|
}
|
|
}
|