diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-23 00:54:24 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:59 +0100 |
commit | 2ff7e61e0d30ff166a2ae94575526bffe11fd1a8 (patch) | |
tree | a2b8aba1d10c010cc247f3e0866dcbd627e852f3 /fs/btrfs/reada.c | |
parent | btrfs: simplify btrfs_wait_cache_io prototype (diff) | |
download | linux-2ff7e61e0d30ff166a2ae94575526bffe11fd1a8.tar.xz linux-2ff7e61e0d30ff166a2ae94575526bffe11fd1a8.zip |
btrfs: take an fs_info directly when the root is not used otherwise
There are loads of functions in btrfs that accept a root parameter
but only use it to obtain an fs_info pointer. Let's convert those to
just accept an fs_info pointer directly.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reada.c')
-rw-r--r-- | fs/btrfs/reada.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 8d36fb457594..e88bca87f5d2 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -303,14 +303,13 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, return zone; } -static struct reada_extent *reada_find_extent(struct btrfs_root *root, +static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info, u64 logical, struct btrfs_key *top) { int ret; struct reada_extent *re = NULL; struct reada_extent *re_exist = NULL; - struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_bio *bbio = NULL; struct btrfs_device *dev; struct btrfs_device *prev_dev; @@ -549,7 +548,7 @@ static int reada_add_block(struct reada_control *rc, u64 logical, struct reada_extctl *rec; /* takes one ref */ - re = reada_find_extent(fs_info->tree_root, logical, top); + re = reada_find_extent(fs_info, logical, top); if (!re) return -1; @@ -705,8 +704,7 @@ static int reada_start_machine_dev(struct btrfs_fs_info *fs_info, logical = re->logical; atomic_inc(&dev->reada_in_flight); - ret = reada_tree_block_flagged(fs_info->extent_root, logical, - mirror_num, &eb); + ret = reada_tree_block_flagged(fs_info, logical, mirror_num, &eb); if (ret) __readahead_hook(fs_info, re, NULL, ret); else if (eb) |