diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-22 18:54:24 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 10:06:59 -0500 |
commit | 2ff7e61e0d30ff166a2ae94575526bffe11fd1a8 (patch) | |
tree | a2b8aba1d10c010cc247f3e0866dcbd627e852f3 /fs/btrfs/backref.c | |
parent | afdb571890615059ed4f0625209b379aff6cb08d (diff) |
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/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 45ef41f247b1..4577c028333a 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -788,8 +788,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info, | |||
788 | if (ref->key_for_search.type) | 788 | if (ref->key_for_search.type) |
789 | continue; | 789 | continue; |
790 | BUG_ON(!ref->wanted_disk_byte); | 790 | BUG_ON(!ref->wanted_disk_byte); |
791 | eb = read_tree_block(fs_info->tree_root, ref->wanted_disk_byte, | 791 | eb = read_tree_block(fs_info, ref->wanted_disk_byte, 0); |
792 | 0); | ||
793 | if (IS_ERR(eb)) { | 792 | if (IS_ERR(eb)) { |
794 | return PTR_ERR(eb); | 793 | return PTR_ERR(eb); |
795 | } else if (!extent_buffer_uptodate(eb)) { | 794 | } else if (!extent_buffer_uptodate(eb)) { |
@@ -1405,8 +1404,7 @@ again: | |||
1405 | ref->level == 0) { | 1404 | ref->level == 0) { |
1406 | struct extent_buffer *eb; | 1405 | struct extent_buffer *eb; |
1407 | 1406 | ||
1408 | eb = read_tree_block(fs_info->extent_root, | 1407 | eb = read_tree_block(fs_info, ref->parent, 0); |
1409 | ref->parent, 0); | ||
1410 | if (IS_ERR(eb)) { | 1408 | if (IS_ERR(eb)) { |
1411 | ret = PTR_ERR(eb); | 1409 | ret = PTR_ERR(eb); |
1412 | goto out; | 1410 | goto out; |