aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-01-02 13:03:17 -0500
committerDavid Sterba <dsterba@suse.cz>2015-01-14 13:23:47 -0500
commitc234a24de91837db6f00aeebe28e3daddc53c1b7 (patch)
tree39a09775961979e11b938009cc26d5020d6b857c /fs
parent14692cc150d3ce10ea8766ccb2a8f483b77b49f0 (diff)
btrfs: cleanup, remove inode_ref_info helper
A simple wrapper around btrfs_find_item. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/backref.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 6fdf82bb03d4..f55721ff9385 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1246,14 +1246,6 @@ int btrfs_check_shared(struct btrfs_trans_handle *trans,
1246 return ret; 1246 return ret;
1247} 1247}
1248 1248
1249static int inode_ref_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
1250 struct btrfs_path *path,
1251 struct btrfs_key *found_key)
1252{
1253 return btrfs_find_item(fs_root, path, inum, ioff,
1254 BTRFS_INODE_REF_KEY, found_key);
1255}
1256
1257int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid, 1249int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
1258 u64 start_off, struct btrfs_path *path, 1250 u64 start_off, struct btrfs_path *path,
1259 struct btrfs_inode_extref **ret_extref, 1251 struct btrfs_inode_extref **ret_extref,
@@ -1363,7 +1355,8 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path,
1363 btrfs_tree_read_unlock_blocking(eb); 1355 btrfs_tree_read_unlock_blocking(eb);
1364 free_extent_buffer(eb); 1356 free_extent_buffer(eb);
1365 } 1357 }
1366 ret = inode_ref_info(parent, 0, fs_root, path, &found_key); 1358 ret = btrfs_find_item(fs_root, path, parent, 0,
1359 BTRFS_INODE_REF_KEY, &found_key);
1367 if (ret > 0) 1360 if (ret > 0)
1368 ret = -ENOENT; 1361 ret = -ENOENT;
1369 if (ret) 1362 if (ret)
@@ -1716,8 +1709,10 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root,
1716 struct btrfs_key found_key; 1709 struct btrfs_key found_key;
1717 1710
1718 while (!ret) { 1711 while (!ret) {
1719 ret = inode_ref_info(inum, parent ? parent+1 : 0, fs_root, path, 1712 ret = btrfs_find_item(fs_root, path, inum,
1720 &found_key); 1713 parent ? parent + 1 : 0, BTRFS_INODE_REF_KEY,
1714 &found_key);
1715
1721 if (ret < 0) 1716 if (ret < 0)
1722 break; 1717 break;
1723 if (ret) { 1718 if (ret) {