btrfs: remove useless path release in the fast fsync path
authorFilipe Manana <fdmanana@suse.com>
Thu, 3 Feb 2022 14:55:49 +0000 (14:55 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:19:50 +0000 (16:19 +0100)
commit799514f81ea9eca6f84197198ae0ded18191a0cd
treeb9ff92c076c3060ceac49bcb9f9ebb5b56ec7dce
parente1e5784c7ce2e38f7aeb7326e134baa19495204a
btrfs: remove useless path release in the fast fsync path

There's no point in calling btrfs_release_path() after finishing the loop
that logs the modified extents, since log_one_extent() returns with the
path released. In case the list of extents is empty, the path is already
released, so there's no need for that case as well.
So just remove that unnecessary btrfs_release_path() call.

This change if part of a patchset that is comprised of the following
patches:

  1/6 btrfs: remove unnecessary leaf free space checks when pushing items
  2/6 btrfs: avoid unnecessary COW of leaves when deleting items from a leaf
  3/6 btrfs: avoid unnecessary computation when deleting items from a leaf
  4/6 btrfs: remove constraint on number of visited leaves when replacing extents
  5/6 btrfs: remove useless path release in the fast fsync path
  6/6 btrfs: prepare extents to be logged before locking a log tree path

The last patch in the series has some performance test result in its
changelog.

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