btrfs: send: remove unused found_type parameter to lookup_dir_item_inode()

As far as I can tell, this was never used. No functional change.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Omar Sandoval 2021-11-04 17:00:12 -07:00 committed by David Sterba
parent dc2e724e0f
commit eab67c0645

View File

@ -1688,8 +1688,7 @@ out:
*/ */
static int lookup_dir_item_inode(struct btrfs_root *root, static int lookup_dir_item_inode(struct btrfs_root *root,
u64 dir, const char *name, int name_len, u64 dir, const char *name, int name_len,
u64 *found_inode, u64 *found_inode)
u8 *found_type)
{ {
int ret = 0; int ret = 0;
struct btrfs_dir_item *di; struct btrfs_dir_item *di;
@ -1712,7 +1711,6 @@ static int lookup_dir_item_inode(struct btrfs_root *root,
goto out; goto out;
} }
*found_inode = key.objectid; *found_inode = key.objectid;
*found_type = btrfs_dir_type(path->nodes[0], di);
out: out:
btrfs_free_path(path); btrfs_free_path(path);
@ -1835,7 +1833,6 @@ static int will_overwrite_ref(struct send_ctx *sctx, u64 dir, u64 dir_gen,
int ret = 0; int ret = 0;
u64 gen; u64 gen;
u64 other_inode = 0; u64 other_inode = 0;
u8 other_type = 0;
if (!sctx->parent_root) if (!sctx->parent_root)
goto out; goto out;
@ -1863,7 +1860,7 @@ static int will_overwrite_ref(struct send_ctx *sctx, u64 dir, u64 dir_gen,
} }
ret = lookup_dir_item_inode(sctx->parent_root, dir, name, name_len, ret = lookup_dir_item_inode(sctx->parent_root, dir, name, name_len,
&other_inode, &other_type); &other_inode);
if (ret < 0 && ret != -ENOENT) if (ret < 0 && ret != -ENOENT)
goto out; goto out;
if (ret) { if (ret) {
@ -1908,7 +1905,6 @@ static int did_overwrite_ref(struct send_ctx *sctx,
int ret = 0; int ret = 0;
u64 gen; u64 gen;
u64 ow_inode; u64 ow_inode;
u8 other_type;
if (!sctx->parent_root) if (!sctx->parent_root)
goto out; goto out;
@ -1932,7 +1928,7 @@ static int did_overwrite_ref(struct send_ctx *sctx,
/* check if the ref was overwritten by another ref */ /* check if the ref was overwritten by another ref */
ret = lookup_dir_item_inode(sctx->send_root, dir, name, name_len, ret = lookup_dir_item_inode(sctx->send_root, dir, name, name_len,
&ow_inode, &other_type); &ow_inode);
if (ret < 0 && ret != -ENOENT) if (ret < 0 && ret != -ENOENT)
goto out; goto out;
if (ret) { if (ret) {