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>
This commit is contained in:

committed by
David Sterba

parent
afdb571890
commit
2ff7e61e0d
@@ -788,8 +788,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info,
|
||||
if (ref->key_for_search.type)
|
||||
continue;
|
||||
BUG_ON(!ref->wanted_disk_byte);
|
||||
eb = read_tree_block(fs_info->tree_root, ref->wanted_disk_byte,
|
||||
0);
|
||||
eb = read_tree_block(fs_info, ref->wanted_disk_byte, 0);
|
||||
if (IS_ERR(eb)) {
|
||||
return PTR_ERR(eb);
|
||||
} else if (!extent_buffer_uptodate(eb)) {
|
||||
@@ -1405,8 +1404,7 @@ again:
|
||||
ref->level == 0) {
|
||||
struct extent_buffer *eb;
|
||||
|
||||
eb = read_tree_block(fs_info->extent_root,
|
||||
ref->parent, 0);
|
||||
eb = read_tree_block(fs_info, ref->parent, 0);
|
||||
if (IS_ERR(eb)) {
|
||||
ret = PTR_ERR(eb);
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user