diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-09-01 15:51:19 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-09-23 08:49:20 +0200 |
| commit | b343047c1a08779efb0d2691a8c6391318025cc6 (patch) | |
| tree | 89ac3c892efc5f3319b1a63c372cdf50a87155bb | |
| parent | 29d9c5e0370593cec8298601ab3e9ce29799fb6f (diff) | |
btrfs: avoid path allocations when dropping extents during log replay
We can avoid a path allocation in the btrfs_drop_extents() calls we have
at replay_one_extent() and replay_one_buffer() by passing the path we
already have in those contextes as it's unused by the time they call
btrfs_drop_extents().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
| -rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 5754333ae732..a912ccdf1485 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -738,6 +738,7 @@ static noinline int replay_one_extent(struct walk_control *wc, struct btrfs_path drop_args.start = start; drop_args.end = extent_end; drop_args.drop_cache = true; + drop_args.path = path; ret = btrfs_drop_extents(trans, root, inode, &drop_args); if (ret) { btrfs_abort_transaction(trans, ret); @@ -2676,6 +2677,7 @@ static int replay_one_buffer(struct extent_buffer *eb, drop_args.start = from; drop_args.end = (u64)-1; drop_args.drop_cache = true; + drop_args.path = path; ret = btrfs_drop_extents(trans, root, inode, &drop_args); if (ret) { btrfs_abort_transaction(trans, ret); |
