btrfs: allocate path earlier at btrfs_del_dir_entries_in_log()
authorFilipe Manana <fdmanana@suse.com>
Thu, 29 May 2025 15:32:37 +0000 (16:32 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:53:29 +0000 (23:53 +0200)
commitb32efae7b853585b1453f169fa5a14565b652326
tree80037235e04ce6f5d3317cbbb69ef8edabb52ee3
parent181436a85b16f9fa860d407ed37c726149fc3301
btrfs: allocate path earlier at btrfs_del_dir_entries_in_log()

Instead of allocating the path after joining the log transaction, allocate
it before so that we're not delaying log commits for the rare cases where
the allocation takes a significant time (under memory pressure and all
slabs are full, there's the need to allocate a new page, etc).

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>
fs/btrfs/tree-log.c