Skip to contentSkip to conversation

smb: server: remove code guarded by nonexistent config option

PATCH Applied Ethan Nelson-Moore 2 participants 2 messages Jun 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smb: server: remove code guarded by nonexistent config option

A small piece of code in fs/smb/server/smb_common.c depends on CONFIG_SMB_INSECURE_SERVER, which has never been defined in the mainline kernel, but was present in old out-of-tree versions of ksmbd. Remove this dead code.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 fs/smb/server/smb_common.c | 3 ---
 1 file changed, 3 deletions(-)
fs/smb/server/smb_common.c +0 -3
index 741aabdfcef5..82de4fdfe446 100644
@@ -102,9 +102,6 @@ static const struct {
 	int version;
 	const char *string;
 } version_strings[] = {
-#ifdef CONFIG_SMB_INSECURE_SERVER
-	{SMB1_PROT, SMB1_VERSION_STRING},
-#endif
 	{SMB2_PROT, SMB20_VERSION_STRING},
 	{SMB21_PROT, SMB21_VERSION_STRING},
 	{SMB30_PROT, SMB30_VERSION_STRING},
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 10 lines · Ethan Nelson-Moore

A small piece of code in fs/smb/server/smb_common.c depends on CONFIG_SMB_INSECURE_SERVER, which has never been defined in the mainline kernel, but was present in old out-of-tree versions of ksmbd. Remove this dead code.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Applied it to #ksmbd-for-next-next.
Thanks!