btrfs: send: factor out common logic when sending xattrs
authorFilipe Manana <fdmanana@suse.com>
Tue, 11 Feb 2025 11:01:15 +0000 (11:01 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:45 +0000 (20:35 +0100)
commit17f6a74d0b89092e38e3328b66eda1ab29a195d4
treec41c5f011205805fee17c006e520e60550c5d931
parent91e9139e5b2531c53e165114227134d68b17c4f5
btrfs: send: factor out common logic when sending xattrs

We always send xattrs for the current inode only and both callers of
send_set_xattr() pass a path for the current inode. So move the path
allocation and computation to send_set_xattr(), reducing duplicated
code. This also facilitates an upcoming patch.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c