Skip to content

Commit 79072dc

Browse files
fdmananakdave
authored andcommitted
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 <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Filipe Manana <[email protected]>
1 parent a631366 commit 79072dc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/btrfs/tree-log.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
786786
* as the owner of the file extent changed from log tree (doesn't affect
787787
* qgroup) to fs/file tree (affects qgroup).
788788
*/
789-
ret = btrfs_qgroup_trace_extent(trans,
790-
btrfs_file_extent_disk_bytenr(eb, item),
791-
btrfs_file_extent_disk_num_bytes(eb, item));
789+
ret = btrfs_qgroup_trace_extent(trans, ins.objectid, ins.offset);
792790
if (ret < 0) {
793791
btrfs_abort_transaction(trans, ret);
794792
goto out;

0 commit comments

Comments
 (0)