]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: remove unused smbd_connection->protocol
authorStefan Metzmacher <metze@samba.org>
Mon, 18 Aug 2025 08:42:42 +0000 (10:42 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:49 +0000 (18:29 -0500)
There is only one protocol version for smbdirect yet and
this variable is write only.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifs_debug.c
fs/smb/client/smbdirect.c
fs/smb/client/smbdirect.h

index 3086ab2622baac323b20c48932001039c092f1af..e407bedd4aa7610a4a89aa96ebd51eae4cfd7b1a 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 #ifdef CONFIG_CIFS_SMB_DIRECT
 #include "smbdirect.h"
+#include "../common/smbdirect/smbdirect_pdu.h"
 #endif
 #include "cifs_swn.h"
 #include "cached_dir.h"
@@ -458,7 +459,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 
                seq_printf(m, "\nSMBDirect protocol version: 0x%x "
                        "transport status: %s (%u)",
-                       server->smbd_conn->protocol,
+                       SMBDIRECT_V1,
                        smbdirect_socket_status_string(sc->status),
                        sc->status);
                seq_printf(m, "\nConn receive_credit_max: %u "
index efebc4aa297fa9c636e5c9503819971a2cc68e70..6c1bec769e88fd4284feca6e833a86edbb9739db 100644 (file)
@@ -481,7 +481,6 @@ static bool process_negotiation_response(
                        le16_to_cpu(packet->negotiated_version));
                return false;
        }
-       info->protocol = le16_to_cpu(packet->negotiated_version);
 
        if (packet->credits_requested == 0) {
                log_rdma_event(ERR, "error: credits_requested==0\n");
index 5f9ba769623b034a5f099a8c5f85711a468b24b9..90238a917256dabed71010c665e7143610e092a5 100644 (file)
@@ -39,8 +39,6 @@ extern int smbd_receive_credit_max;
 struct smbd_connection {
        struct smbdirect_socket socket;
 
-       /* dynamic connection parameters defined in [MS-SMBD] 3.1.1.1 */
-       int protocol;
 
        /* Memory registrations */
        /* Maximum number of pages in a single RDMA write/read on this connection */