public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree()
@ 2026-02-16 16:16 Burenchev Evgenii
  2026-02-17  9:37 ` Fedor Pchelkin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Burenchev Evgenii @ 2026-02-16 16:16 UTC (permalink / raw)
  To: clm@fb.com, dsterba@suse.com
  Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org

From ff2df73ba6483b0dc67b3ed89d2a43c49f1c2eb8 Mon Sep 17 00:00:00 2001
From: Evgenii Burenchev <eburenchev@orionsoft.ru>
Date: Mon, 16 Feb 2026 18:39:30 +0300
Subject: [PATCH] btrfs: remove dead assignment to dirid in
 btrfs_search_path_in_tree()

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 = 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@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 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 = key.offset;
 		key.offset = (u64)-1;
-		dirid = key.objectid;
 	}
 	memmove(name, ptr, total_len);
 	name[total_len] = '\0';
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-17 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 16:16 [PATCH] btrfs: remove dead assignment to dirid in btrfs_search_path_in_tree() Burenchev Evgenii
2026-02-17  9:37 ` Fedor Pchelkin
2026-02-17 10:17 ` Miquel Sabaté Solà
     [not found] ` <6994405b.170a0220.24287.89ffSMTPIN_ADDED_BROKEN@mx.google.com>
2026-02-17 10:53   ` Filipe Manana
2026-02-17 11:23     ` Miquel Sabaté Solà

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