btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree()
PATCH v2 1/2 btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree()
Related discussion: https://lore.kernel.org/linux-btrfs/[email protected]
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 assignment:
dirid = key.objectid;
no longer affects control flow 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.
Changes since v1:
- split from original patch
Signed-off-by Evgenii Burenchev <[email protected]>
--- fs/btrfs/ioctl.c | 1 - 1 file changed, 1 deletion(-)
fs/btrfs/ioctl.c +0 -1
@@ -1707,7 +1707,6 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,btrfs_release_path (path); key.objectid = key.offset; key.offset = (u64)-1 ; - dirid = key.objectid; }memmove (name, ptr, total_len); name[total_len] ='\0' ;
Signature · 1 line
2.43.0