Skip to content

Commit

Permalink
btrfs: cleanup, remove inode_ref_info helper
Browse files Browse the repository at this point in the history
A simple wrapper around btrfs_find_item.

Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Jan 14, 2015
1 parent 14692cc commit c234a24
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions fs/btrfs/backref.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,14 +1246,6 @@ int btrfs_check_shared(struct btrfs_trans_handle *trans,
return ret;
}

static int inode_ref_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
struct btrfs_path *path,
struct btrfs_key *found_key)
{
return btrfs_find_item(fs_root, path, inum, ioff,
BTRFS_INODE_REF_KEY, found_key);
}

int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
u64 start_off, struct btrfs_path *path,
struct btrfs_inode_extref **ret_extref,
Expand Down Expand Up @@ -1363,7 +1355,8 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path,
btrfs_tree_read_unlock_blocking(eb);
free_extent_buffer(eb);
}
ret = inode_ref_info(parent, 0, fs_root, path, &found_key);
ret = btrfs_find_item(fs_root, path, parent, 0,
BTRFS_INODE_REF_KEY, &found_key);
if (ret > 0)
ret = -ENOENT;
if (ret)
Expand Down Expand Up @@ -1716,8 +1709,10 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root,
struct btrfs_key found_key;

while (!ret) {
ret = inode_ref_info(inum, parent ? parent+1 : 0, fs_root, path,
&found_key);
ret = btrfs_find_item(fs_root, path, inum,
parent ? parent + 1 : 0, BTRFS_INODE_REF_KEY,
&found_key);

if (ret < 0)
break;
if (ret) {
Expand Down

0 comments on commit c234a24

Please sign in to comment.