summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-10-09 16:31:06 +0200
committerDavid Sterba <dsterba@suse.com>2024-11-11 14:34:15 +0100
commita1e76e362f0467c872ff263d6d94276090aeb2ea (patch)
tree60c5ad8ee46defde842fd82de04e9545eafbbdf0 /fs/btrfs
parent343a63594bb6a49d094860705817aad6663b1f8f (diff)
btrfs: send: drop unused parameter num from iterate_inode_ref_t callbacks
None of the ref iteration callbacks needs the num parameter (this is for the directory item iteration), so we can drop it. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/send.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index b068469871f8..b8ffded33fef 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -980,7 +980,7 @@ static int get_inode_gen(struct btrfs_root *root, u64 ino, u64 *gen)
return ret;
}
-typedef int (*iterate_inode_ref_t)(int num, u64 dir, int index,
+typedef int (*iterate_inode_ref_t)(u64 dir, int index,
struct fs_path *p,
void *ctx);
@@ -1007,7 +1007,6 @@ static int iterate_inode_ref(struct btrfs_root *root, struct btrfs_path *path,
u32 name_len;
char *start;
int ret = 0;
- int num = 0;
int index;
u64 dir;
unsigned long name_off;
@@ -1094,10 +1093,9 @@ static int iterate_inode_ref(struct btrfs_root *root, struct btrfs_path *path,
}
cur += elem_size + name_len;
- ret = iterate(num, dir, index, p, ctx);
+ ret = iterate(dir, index, p, ctx);
if (ret)
goto out;
- num++;
}
out:
@@ -1227,7 +1225,7 @@ out:
return ret;
}
-static int __copy_first_ref(int num, u64 dir, int index,
+static int __copy_first_ref(u64 dir, int index,
struct fs_path *p, void *ctx)
{
int ret;
@@ -4708,7 +4706,7 @@ out:
return ret;
}
-static int record_new_ref_if_needed(int num, u64 dir, int index,
+static int record_new_ref_if_needed(u64 dir, int index,
struct fs_path *name, void *ctx)
{
int ret = 0;
@@ -4738,7 +4736,7 @@ out:
return ret;
}
-static int record_deleted_ref_if_needed(int num, u64 dir, int index,
+static int record_deleted_ref_if_needed(u64 dir, int index,
struct fs_path *name, void *ctx)
{
int ret = 0;