mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/2] btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree()
@ 2026-02-25 12:41 Burenchev Evgenii
  0 siblings, 0 replies; only message in thread
From: Burenchev Evgenii @ 2026-02-25 12:41 UTC (permalink / raw)
  To: dsterba
  Cc: clm, dsterba, linux-btrfs, linux-kernel, lvc-project, mssola, fdmanana


Related discussion: https://lore.kernel.org/linux-btrfs/20260224172835.GB26902@twin.jikos.cz

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 <eburenchev@orionsoft.ru>
---
 fs/btrfs/ioctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index ae2173235c4d..3a45ee1a7026 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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';
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-25 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 12:41 [PATCH v2 1/2] btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree() Burenchev Evgenii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®