Commit 163e97ee authored by David Sterba's avatar David Sterba

btrfs: get fs_info from device in btrfs_scrub_cancel_dev

We can read fs_info from the device and can drop it from the parameters.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent f331a952
......@@ -3752,8 +3752,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
void btrfs_scrub_pause(struct btrfs_fs_info *fs_info);
void btrfs_scrub_continue(struct btrfs_fs_info *fs_info);
int btrfs_scrub_cancel(struct btrfs_fs_info *info);
int btrfs_scrub_cancel_dev(struct btrfs_fs_info *info,
struct btrfs_device *dev);
int btrfs_scrub_cancel_dev(struct btrfs_device *dev);
int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
struct btrfs_scrub_progress *progress);
static inline void btrfs_init_full_stripe_locks_tree(
......
......@@ -3999,9 +3999,9 @@ int btrfs_scrub_cancel(struct btrfs_fs_info *fs_info)
return 0;
}
int btrfs_scrub_cancel_dev(struct btrfs_fs_info *fs_info,
struct btrfs_device *dev)
int btrfs_scrub_cancel_dev(struct btrfs_device *dev)
{
struct btrfs_fs_info *fs_info = dev->fs_info;
struct scrub_ctx *sctx;
mutex_lock(&fs_info->scrub_lock);
......
......@@ -2149,7 +2149,7 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
goto error_undo;
clear_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state);
btrfs_scrub_cancel_dev(fs_info, device);
btrfs_scrub_cancel_dev(device);
/*
* the device list mutex makes sure that we don't change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment