]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: free path at can_nocow_extent() before checking for checksum items
authorFilipe Manana <fdmanana@suse.com>
Wed, 23 Mar 2022 16:19:27 +0000 (16:19 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:10 +0000 (17:03 +0200)
commitb22b6dd1c8669b3d4da5a2a22f3cbce5fc80768d
treeb84c7ffc4defe57983d2dfeb4bfb67e6db2b8800
parent795566a5310b41c4de7ced30f778a588158e452d
btrfs: free path at can_nocow_extent() before checking for checksum items

When we look for checksum items, through csum_exist_in_range(), at
can_nocow_extent(), we no longer need the path that we have previously
allocated. Through csum_exist_in_range() -> btrfs_lookup_csums_range(),
we also end up allocating a path, so we are adding unnecessary extra
memory usage. So free the path before calling csum_exist_in_range().

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/inode.c