cifs: remove dead code

This change “cifs: remove dead code” (commit 116ae5e) in Linux kernel is authored by Arnd Bergmann <arnd [at]> on Mon Sep 8 17:20:56 2014 +0200.

Description of "cifs: remove dead code"

The change “cifs: remove dead code” introduces changes as follows.

cifs: remove dead code

cifs provides two dummy functions 'sess_auth_lanman' and
'sess_auth_kerberos' for the case in which the respective
features are not defined. However, the caller is also under
an #ifdef, so we just get warnings about unused code:

fs/cifs/sess.c:1109:1: warning: 'sess_auth_kerberos' defined but not used [-Wunused-function]
 sess_auth_kerberos(struct sess_data *sess_data)

Removing the dead functions gets rid of the warnings without
any downsides that I can see.

(Yalin Wang reported the identical problem and fix so added him)

Signed-off-by: Arnd Bergmann <>
Signed-off-by: Yalin Wang <>
Signed-off-by: Steve French <>

Linux kernel releases containing commit 116ae5e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "cifs: remove dead code"

There are 17 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/cifs/sess.c | 17 -----------------
 1 file changed, 17 deletions(-)
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 3a5e83317683..57db63ff88da 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -745,14 +745,6 @@ sess_auth_lanman(struct sess_data *sess_data)
-static void
-sess_auth_lanman(struct sess_data *sess_data)
-	sess_data->result = -EOPNOTSUPP;
-	sess_data->func = NULL;
 static void
@@ -1103,15 +1095,6 @@ sess_auth_kerberos(struct sess_data *sess_data)
 	ses->auth_key.response = NULL;
-static void
-sess_auth_kerberos(struct sess_data *sess_data)
-	cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
-	sess_data->result = -ENOSYS;
-	sess_data->func = NULL;
 #endif /* ! CONFIG_CIFS_UPCALL */

The commit for this change in Linux stable tree is 116ae5e (patch).

Last modified: 2020/02/10