btrfs: add and use helper for unlinking inode during log replay
authorFilipe Manana <fdmanana@suse.com>
Mon, 28 Feb 2022 16:29:29 +0000 (16:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:09 +0000 (10:30 +0200)
commit985bbad1840829a8a8a7287cbc5a9667ea5e35e1
tree694940abd5089b24c84c8385e6030e5c42a92490
parent96881521121269d444791474dab3ec54c07a05fa
btrfs: add and use helper for unlinking inode during log replay

[ Upstream commit 313ab75399d0c7d0ebc718c545572c1b4d8d22ef ]

During log replay there is this pattern of running delayed items after
every inode unlink. To avoid repeating this several times, move the
logic into an helper function and use it instead of calling
btrfs_unlink_inode() followed by btrfs_run_delayed_items().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/tree-log.c