]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: use local key variable to pass arguments in replay_one_extent()
authorFilipe Manana <fdmanana@suse.com>
Mon, 21 Jul 2025 12:48:12 +0000 (13:48 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Sep 2025 08:54:30 +0000 (10:54 +0200)
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>
fs/btrfs/tree-log.c

index 4fad7cbfcb2633b7e22253fb62ea528da638a2df..265ee7557ecb3d7ee7e5325f5bdcb7a9be95cb76 100644 (file)
@@ -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;