btrfs: refactor btrfs_find_device() take fs_devices as argument
[sfrench/cifs-2.6.git] / fs / btrfs / scrub.c
index 6dcd36d7b84906bc4585c861ea7b55659d365fe3..72044efc610ac1df8c55f17d4da60d4cb67efa7a 100644 (file)
@@ -3835,7 +3835,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
                return PTR_ERR(sctx);
 
        mutex_lock(&fs_info->fs_devices->device_list_mutex);
-       dev = btrfs_find_device(fs_info, devid, NULL, NULL);
+       dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
        if (!dev || (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state) &&
                     !is_dev_replace)) {
                mutex_unlock(&fs_info->fs_devices->device_list_mutex);
@@ -4012,7 +4012,7 @@ int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
        struct scrub_ctx *sctx = NULL;
 
        mutex_lock(&fs_info->fs_devices->device_list_mutex);
-       dev = btrfs_find_device(fs_info, devid, NULL, NULL);
+       dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
        if (dev)
                sctx = dev->scrub_ctx;
        if (sctx)