]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: stop allocating a path when checking if cross reference exists
authorFilipe Manana <fdmanana@suse.com>
Wed, 23 Mar 2022 16:19:26 +0000 (16:19 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:10 +0000 (17:03 +0200)
commit21ce5244c50b46f82fc317a78ba8dad856f8c7b1
tree7ccdf8499a44a93d031e62034678253065189b0f
parent44bc20c204262bb0bb487eccb551c5a661c30e9c
btrfs: stop allocating a path when checking if cross reference exists

At btrfs_cross_ref_exist() we always allocate a path, but we really don't
need to because all its callers (only 2) already have an allocated path
that is not being used when they call btrfs_cross_ref_exist(). So change
btrfs_cross_ref_exist() to take a path as an argument and update both
its callers to pass in the unused path they have when they call
btrfs_cross_ref_exist().

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/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c