diff options
author | David Sterba <dsterba@suse.com> | 2019-03-20 16:32:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:47 +0200 |
commit | 163e97ee0d0f8194ef66f10b0bf0851b7f6b55dd (patch) | |
tree | 38b33524c13cf02c1eff92bfee2d6c8e4bbcda9a /fs/btrfs | |
parent | f331a9525f96c8f24e33b368521dfdeed3cb6f9d (diff) | |
download | linux-stable-163e97ee0d0f8194ef66f10b0bf0851b7f6b55dd.tar.gz linux-stable-163e97ee0d0f8194ef66f10b0bf0851b7f6b55dd.tar.bz2 linux-stable-163e97ee0d0f8194ef66f10b0bf0851b7f6b55dd.zip |
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: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ctree.h | 3 | ||||
-rw-r--r-- | fs/btrfs/scrub.c | 4 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 69a60d2217e5..05731e4ca358 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -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( diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index ed471ffbf115..f7b29f9db5e2 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -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); diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index dcbfd027fdf6..c5bdd38179b6 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -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 |