diff options
-rw-r--r-- | fs/btrfs/volumes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 096b4a3dc5a9..361a66e2c179 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1819,7 +1819,13 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, | |||
1819 | 1819 | ||
1820 | WARN_ON(!mutex_is_locked(&fs_info->fs_devices->device_list_mutex)); | 1820 | WARN_ON(!mutex_is_locked(&fs_info->fs_devices->device_list_mutex)); |
1821 | 1821 | ||
1822 | fs_devices = fs_info->fs_devices; | 1822 | /* |
1823 | * in case of fs with no seed, srcdev->fs_devices will point | ||
1824 | * to fs_devices of fs_info. However when the dev being replaced is | ||
1825 | * a seed dev it will point to the seed's local fs_devices. In short | ||
1826 | * srcdev will have its correct fs_devices in both the cases. | ||
1827 | */ | ||
1828 | fs_devices = srcdev->fs_devices; | ||
1823 | 1829 | ||
1824 | list_del_rcu(&srcdev->dev_list); | 1830 | list_del_rcu(&srcdev->dev_list); |
1825 | list_del_rcu(&srcdev->dev_alloc_list); | 1831 | list_del_rcu(&srcdev->dev_alloc_list); |