diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-11-19 17:59:52 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-25 01:53:33 +0100 |
| commit | 5c9cac55b7a2c203cc135560fce053beea173c0f (patch) | |
| tree | 7d1f743d02c28d8dc812a034678f02ae24d6bb17 /scripts/livepatch/init.c | |
| parent | 7c3acdb998dd723ac791cd4a47f13599d76a1f58 (diff) | |
btrfs: send: do not allocate memory for xattr data when checking it exists
When checking if xattrs were deleted we don't care about their data, but
we are allocating memory for the data and copying it, which only wastes
time and can result in an unnecessary error in case the allocation fails.
So stop allocating memory and copying data by making find_xattr() and
__find_xattr() skip those steps if the given data buffer is NULL.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/livepatch/init.c')
0 files changed, 0 insertions, 0 deletions
