btrfs: remove redundant path release when replaying a log tree
authorFilipe Manana <fdmanana@suse.com>
Wed, 21 May 2025 16:56:25 +0000 (17:56 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:50:34 +0000 (23:50 +0200)
There's no need to call btrfs_release_path() before calling
btrfs_init_root_free_objectid() as we have released the path already at
the top of the loop and the previous call to fixup_inode_link_counts()
also releases the path. So remove it to simplify the code.

Reviewed-by: Qu Wenruo <wqu@suse.com>
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

index 6a60f072c36596e975f35eb5744923261b67af93..e52e15d46114cedf7bdbf01052711ca16000443e 100644 (file)
@@ -7302,8 +7302,6 @@ again:
                if (!ret && wc.stage == LOG_WALK_REPLAY_ALL) {
                        struct btrfs_root *root = wc.replay_dest;
 
-                       btrfs_release_path(path);
-
                        /*
                         * We have just replayed everything, and the highest
                         * objectid of fs roots probably has changed in case