smb: client: pass struct smbdirect_socket to smbd_negotiate()
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Aug 2025 09:54:30 +0000 (11:54 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:50 +0000 (18:29 -0500)
This will make it easier to move function to the common code
in future.

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/smbdirect.c

index b4f257b..2304a5c 100644 (file)
@@ -1264,9 +1264,8 @@ static int smbd_post_recv(
 }
 
 /* Perform SMBD negotiate according to [MS-SMBD] 3.1.5.2 */
-static int smbd_negotiate(struct smbd_connection *info)
+static int smbd_negotiate(struct smbdirect_socket *sc)
 {
-       struct smbdirect_socket *sc = &info->socket;
        struct smbdirect_socket_parameters *sp = &sc->parameters;
        int rc;
        struct smbdirect_recv_io *response = get_receive_buffer(sc);
@@ -1879,7 +1878,7 @@ static struct smbd_connection *_smbd_get_connection(
 
        INIT_WORK(&sc->recv_io.posted.refill_work, smbd_post_send_credits);
 
-       rc = smbd_negotiate(info);
+       rc = smbd_negotiate(sc);
        if (rc) {
                log_rdma_event(ERR, "smbd_negotiate rc=%d\n", rc);
                goto negotiation_failed;