diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-05-29 16:59:07 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-07-21 23:53:30 +0200 |
| commit | 5f8882c8540efc501e2836afbc0eb06a84bf2ff2 (patch) | |
| tree | ba19bf55540a149fccdcf51c2f6fe9814ab48146 /fs/btrfs/inode.c | |
| parent | btrfs: allocate scratch eb earlier at btrfs_log_new_name() (diff) | |
| download | linux-5f8882c8540efc501e2836afbc0eb06a84bf2ff2.tar.gz linux-5f8882c8540efc501e2836afbc0eb06a84bf2ff2.zip | |
btrfs: pass NULL index to btrfs_del_inode_ref() where not needed
There are two callers of btrfs_del_inode_ref() that declare a local index
variable and then pass a pointer for it to btrfs_del_inode_ref(), but then
don't use that index at all. Since btrfs_del_inode_ref() accepts a NULL
index pointer, pass NULL instead and stop declaring those useless index
variables.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0f2cbaf8320d..474cb40a42f7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6711,10 +6711,9 @@ fail_dir_item: if (ret2) btrfs_abort_transaction(trans, ret2); } else if (add_backref) { - u64 local_index; int ret2; - ret2 = btrfs_del_inode_ref(trans, root, name, ino, parent_ino, &local_index); + ret2 = btrfs_del_inode_ref(trans, root, name, ino, parent_ino, NULL); if (ret2) btrfs_abort_transaction(trans, ret2); } |
