From: Filipe Manana Date: Wed, 21 May 2025 16:56:25 +0000 (+0100) Subject: btrfs: remove redundant path release when replaying a log tree X-Git-Tag: block-6.17-20250808~77^2~199 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=6466084df6b083b6f0778aa9adcb83cb8880597e;p=linux-block.git btrfs: remove redundant path release when replaying a log tree 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 Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 6a60f072c365..e52e15d46114 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -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