[PATCH] btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree()
From: Evgenii Burenchev
Date: Mon Feb 16 2026 - 10:39:30 EST
After the introduction of btrfs_search_backwards(), the directory
traversal state in btrfs_search_path_in_tree() is fully maintained via
struct btrfs_key. The local variable 'dirid' is no longer used to control
the search and the assignment
dirid =3D key.objectid;
has no observable effect and is dead code.
Remove the unused assignment to avoid confusion and silence static
analysis warnings.
No functional change.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Evgenii Burenchev <eburenchev@xxxxxxxxxxxx>
---
fs/btrfs/ioctl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a6cc2d3b414c..292043b11207 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1708,7 +1708,6 @@ static noinline int btrfs_search_path_in_tree(struct =
btrfs_fs_info *info,
btrfs_release_path(path);
key.objectid =3D key.offset;
key.offset =3D (u64)-1;
- dirid =3D key.objectid;
}
memmove(name, ptr, total_len);
name[total_len] =3D '\0';
--=20
2.43.0