aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2025-07-21 13:48:12 +0100
committerDavid Sterba <dsterba@suse.com>2025-09-22 10:54:30 +0200
commitcac2ab34d88e2e4aaa0991038854849a2eaff942 (patch)
treef1efa99657454cc4ba98456101ac0c9805211bfd /fs/btrfs/tree-log.c
parentbtrfs: process inline extent earlier in replay_one_extent() (diff)
downloadwireguard-linux-cac2ab34d88e2e4aaa0991038854849a2eaff942.tar.xz
wireguard-linux-cac2ab34d88e2e4aaa0991038854849a2eaff942.zip
btrfs: use local key variable to pass arguments in replay_one_extent()
Instead of extracting again the disk_bytenr and disk_num_bytes values from the file extent item to pass to btrfs_qgroup_trace_extent(), use the key local variable 'ins' which already has those values, reducing the size of the source code. Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 4fad7cbfcb26..265ee7557ecb 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -779,9 +779,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
* as the owner of the file extent changed from log tree (doesn't affect
* qgroup) to fs/file tree (affects qgroup).
*/
- ret = btrfs_qgroup_trace_extent(trans,
- btrfs_file_extent_disk_bytenr(eb, item),
- btrfs_file_extent_disk_num_bytes(eb, item));
+ ret = btrfs_qgroup_trace_extent(trans, ins.objectid, ins.offset);
if (ret < 0) {
btrfs_abort_transaction(trans, ret);
goto out;