diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-05-18 11:11:55 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-07-03 13:35:11 +0200 |
commit | 9f6dec4dd5d929b12dfca2947116b203b833fa8a (patch) | |
tree | e8ed274113f52a285dfacb546424111796f57929 /cmds-restore.c | |
parent | 8690c887d1dcad384d44ca21bf950a4ec2fbffdb (diff) |
btrfs-progs: Refactor read_node_slot function to get rid of btrfs_root
parameter
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r-- | cmds-restore.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds-restore.c b/cmds-restore.c index ae01430c..06c88b26 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -181,6 +181,7 @@ static int next_leaf(struct btrfs_root *root, struct btrfs_path *path) int offset = 1; struct extent_buffer *c; struct extent_buffer *next = NULL; + struct btrfs_fs_info *fs_info = root->fs_info; again: for (; level < BTRFS_MAX_LEVEL; level++) { @@ -210,7 +211,7 @@ again: if (path->reada) reada_for_search(root, path, level, slot, 0); - next = read_node_slot(root, c, slot); + next = read_node_slot(fs_info, c, slot); if (extent_buffer_uptodate(next)) break; offset++; @@ -226,7 +227,7 @@ again: break; if (path->reada) reada_for_search(root, path, level, 0, 0); - next = read_node_slot(root, next, 0); + next = read_node_slot(fs_info, next, 0); if (!extent_buffer_uptodate(next)) goto again; } |