summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-28 09:36:47 +0300
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:37 +0200
commita22b593587c2c3e4d3b07cedcde5996461f19a06 (patch)
treece9df1d939e4c7fe68fb63d2bafbe85392885a5e /extent-tree.c
parent12e2280d7bef145859e4d208533056ec90af9a4e (diff)
btrfs-progs: Change btrfs_root to btrfs_fs_info argument in btrfs_lookup_extent_info
That function really wants an fs_info and not a root. Accidentally, this also makes the kernel/user space signatures to be coherent. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/extent-tree.c b/extent-tree.c
index d90eb81..2fd4e7a 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -1434,7 +1434,7 @@ int btrfs_extent_post_op(struct btrfs_trans_handle *trans)
}
int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, u64 bytenr,
+ struct btrfs_fs_info *fs_info, u64 bytenr,
u64 offset, int metadata, u64 *refs, u64 *flags)
{
struct btrfs_path *path;
@@ -1446,9 +1446,8 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
u64 num_refs;
u64 extent_flags;
- if (metadata &&
- !btrfs_fs_incompat(root->fs_info, SKINNY_METADATA)) {
- offset = root->fs_info->nodesize;
+ if (metadata && !btrfs_fs_incompat(fs_info, SKINNY_METADATA)) {
+ offset = fs_info->nodesize;
metadata = 0;
}
@@ -1465,8 +1464,7 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
key.type = BTRFS_EXTENT_ITEM_KEY;
again:
- ret = btrfs_search_slot(trans, root->fs_info->extent_root, &key, path,
- 0, 0);
+ ret = btrfs_search_slot(trans, fs_info->extent_root, &key, path, 0, 0);
if (ret < 0)
goto out;
@@ -1483,14 +1481,14 @@ again:
path->slots[0]);
if (key.objectid == bytenr &&
key.type == BTRFS_EXTENT_ITEM_KEY &&
- key.offset == root->fs_info->nodesize)
+ key.offset == fs_info->nodesize)
ret = 0;
}
if (ret) {
btrfs_release_path(path);
key.type = BTRFS_EXTENT_ITEM_KEY;
- key.offset = root->fs_info->nodesize;
+ key.offset = fs_info->nodesize;
metadata = 0;
goto again;
}