From 19231903711e412dd2fe383dac0e48e5919bba4b Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Tue, 16 Dec 2025 12:02:18 +0000 Subject: [PATCH] btrfs: remove redundant path release in btrfs_find_orphan_roots() There's no need to release the path in the if branch used when the root does not exists since we released the path before the call to btrfs_get_fs_root(). So remove that redundant btrfs_release_path() call. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/root-tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index a7171112d638f..40f9bc9485e86 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -261,8 +261,6 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info) } else if (ret == -ENOENT) { struct btrfs_trans_handle *trans; - btrfs_release_path(path); - trans = btrfs_join_transaction(tree_root); if (IS_ERR(trans)) { ret = PTR_ERR(trans); -- 2.47.3