btrfs: cleanup, remove inode_item_info helper
authorDavid Sterba <dsterba@suse.cz>
Fri, 2 Jan 2015 17:55:46 +0000 (18:55 +0100)
committerDavid Sterba <dsterba@suse.cz>
Wed, 14 Jan 2015 18:23:47 +0000 (19:23 +0100)
It's only a simple wrapper around btrfs_find_item, the locally defined
key is not used.

Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/scrub.c

index 8729cf68d2fef5e41540283d74beba55285f59c5..6fdf82bb03d410b779ac5b9ac0182bf625d955b3 100644 (file)
@@ -1246,17 +1246,6 @@ int btrfs_check_shared(struct btrfs_trans_handle *trans,
        return ret;
 }
 
-/*
- * this makes the path point to (inum INODE_ITEM ioff)
- */
-int inode_item_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
-                       struct btrfs_path *path)
-{
-       struct btrfs_key key;
-       return btrfs_find_item(fs_root, path, inum, ioff,
-                       BTRFS_INODE_ITEM_KEY, &key);
-}
-
 static int inode_ref_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
                                struct btrfs_path *path,
                                struct btrfs_key *found_key)
index 2a1ac6bfc724637f3a80ac15c6ce6237dc7998f0..9c41fbac30091f39bad52a3f21ebf6e931db364b 100644 (file)
@@ -32,9 +32,6 @@ struct inode_fs_paths {
 typedef int (iterate_extent_inodes_t)(u64 inum, u64 offset, u64 root,
                void *ctx);
 
-int inode_item_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
-                       struct btrfs_path *path);
-
 int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
                        struct btrfs_path *path, struct btrfs_key *found_key,
                        u64 *flags);
index 9e1569ffbf6ea66f1324022db9f9aba559339c73..4846f66391a4565c37d7da9dded20c9a8fa60116 100644 (file)
@@ -530,7 +530,11 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root,
                goto err;
        }
 
-       ret = inode_item_info(inum, 0, local_root, swarn->path);
+       /*
+        * this makes the path point to (inum INODE_ITEM ioff)
+        */
+       ret = btrfs_find_item(local_root, swarn->path, inum, 0,
+                       BTRFS_INODE_ITEM_KEY, NULL);
        if (ret) {
                btrfs_release_path(swarn->path);
                goto err;