diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c846cc8eb32cdc22930f5975df5c4e16daceee18..9dfe038015f7530bf74f1a960fd060f2afd94043 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -666,7 +666,8 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) if (device->bdev) 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); fs_devices->rw_devices--; }