diff options
| author | Filipe Manana <[email protected]> | 2025-03-13 14:00:52 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-03-18 19:35:54 +0000 |
| commit | e48264e601b39df3c8c75f3e7ae896d15cbbebcc (patch) | |
| tree | 419deff31dca4b5f5095a9c86462677e363476b7 /rust | |
| parent | btrfs: don't clobber ret in btrfs_validate_super() (diff) | |
| download | kernel-e48264e601b39df3c8c75f3e7ae896d15cbbebcc.tar.gz kernel-e48264e601b39df3c8c75f3e7ae896d15cbbebcc.zip | |
btrfs: avoid unnecessary memory allocation and copy at overwrite_item()
There's no need to allocate memory and copy from both the destination and
source extent buffers to compare if the items are equal, we can instead
use memcmp_extent_buffer() which allows to do only one memory allocation
and copy instead of two.
So use memcmp_extent_buffer() instead of memcmp(), allowing us to avoid
one memory allocation, which can fail or be slow while under memory heavy
pressure, avoid the memory copying and reducing code.
Signed-off-by: Filipe Manana <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions
