Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14692cc1 authored by David Sterba's avatar David Sterba
Browse files

btrfs: cleanup, remove inode_item_info helper



It's only a simple wrapper around btrfs_find_item, the locally defined
key is not used.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent 381cf658
Loading
Loading
Loading
Loading
+0 −11
Original line number Original line Diff line number Diff line
@@ -1246,17 +1246,6 @@ int btrfs_check_shared(struct btrfs_trans_handle *trans,
	return ret;
	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,
static int inode_ref_info(u64 inum, u64 ioff, struct btrfs_root *fs_root,
				struct btrfs_path *path,
				struct btrfs_path *path,
				struct btrfs_key *found_key)
				struct btrfs_key *found_key)
+0 −3
Original line number Original line Diff line number Diff line
@@ -32,9 +32,6 @@ struct inode_fs_paths {
typedef int (iterate_extent_inodes_t)(u64 inum, u64 offset, u64 root,
typedef int (iterate_extent_inodes_t)(u64 inum, u64 offset, u64 root,
		void *ctx);
		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,
int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
			struct btrfs_path *path, struct btrfs_key *found_key,
			struct btrfs_path *path, struct btrfs_key *found_key,
			u64 *flags);
			u64 *flags);
+5 −1
Original line number Original line Diff line number Diff line
@@ -530,7 +530,11 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root,
		goto err;
		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) {
	if (ret) {
		btrfs_release_path(swarn->path);
		btrfs_release_path(swarn->path);
		goto err;
		goto err;