From 0b246afa62b0cf5b09d078121f543135f28492ad Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Wed, 22 Jun 2016 18:54:23 -0400 Subject: btrfs: root->fs_info cleanup, add fs_info convenience variables In routines where someptr->fs_info is referenced multiple times, we introduce a convenience variable. This makes the code considerably more readable. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba --- fs/btrfs/reada.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs/btrfs/reada.c') diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index c51292abbd03..8d36fb457594 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -335,7 +335,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, if (!re) return NULL; - blocksize = root->fs_info->nodesize; + blocksize = fs_info->nodesize; re->logical = logical; re->top = *top; INIT_LIST_HEAD(&re->extctl); @@ -352,7 +352,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, goto error; if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { - btrfs_err(root->fs_info, + btrfs_err(fs_info, "readahead: more than %d copies not supported", BTRFS_MAX_MIRRORS); goto error; @@ -950,11 +950,10 @@ int btrfs_reada_wait(void *handle) reada_start_machine(fs_info); wait_event_timeout(rc->wait, atomic_read(&rc->elems) == 0, 5 * HZ); - dump_devs(rc->root->fs_info, - atomic_read(&rc->elems) < 10 ? 1 : 0); + dump_devs(fs_info, atomic_read(&rc->elems) < 10 ? 1 : 0); } - dump_devs(rc->root->fs_info, atomic_read(&rc->elems) < 10 ? 1 : 0); + dump_devs(fs_info, atomic_read(&rc->elems) < 10 ? 1 : 0); kref_put(&rc->refcnt, reada_control_release); -- cgit v1.2.3