From 6466084df6b083b6f0778aa9adcb83cb8880597e Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Wed, 21 May 2025 17:56:25 +0100 Subject: [PATCH] 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 --- fs/btrfs/tree-log.c | 2 -- 1 file changed, 2 deletions(-) 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 -- 2.25.1