diff options
| author | Stefan Metzmacher <metze@samba.org> | 2025-08-22 10:14:29 +0200 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-09-28 18:29:50 -0500 |
| commit | be8602d47d4116da477cba0e4284295892887b24 (patch) | |
| tree | b8fe02ae329f20ee9e95339bceb0030d09429b49 | |
| parent | c7e4d5facb47698411d144ea1c968ef3e1794be9 (diff) | |
| download | linux-be8602d47d4116da477cba0e4284295892887b24.tar.gz linux-be8602d47d4116da477cba0e4284295892887b24.zip | |
smb: client: pass struct smbdirect_socket to smbd_post_recv()
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>
| -rw-r--r-- | fs/smb/client/smbdirect.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 9c2fb138ce1f..809c529b1b3c 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -35,7 +35,7 @@ static struct smbdirect_recv_io *_get_first_reassembly( struct smbdirect_socket *sc); static int smbd_post_recv( - struct smbd_connection *info, + struct smbdirect_socket *sc, struct smbdirect_recv_io *response); static int smbd_post_send_empty(struct smbd_connection *info); @@ -535,8 +535,6 @@ static void smbd_post_send_credits(struct work_struct *work) struct smbdirect_recv_io *response; struct smbdirect_socket *sc = container_of(work, struct smbdirect_socket, recv_io.posted.refill_work); - struct smbd_connection *info = - container_of(sc, struct smbd_connection, socket); if (sc->status != SMBDIRECT_SOCKET_CONNECTED) { return; @@ -550,7 +548,7 @@ static void smbd_post_send_credits(struct work_struct *work) break; response->first_segment = false; - rc = smbd_post_recv(info, response); + rc = smbd_post_recv(sc, response); if (rc) { log_rdma_recv(ERR, "post_recv failed rc=%d\n", rc); @@ -1241,9 +1239,8 @@ static int smbd_post_send_full_iter(struct smbd_connection *info, * The interaction is controlled by send/receive credit system */ static int smbd_post_recv( - struct smbd_connection *info, struct smbdirect_recv_io *response) + struct smbdirect_socket *sc, struct smbdirect_recv_io *response) { - struct smbdirect_socket *sc = &info->socket; struct smbdirect_socket_parameters *sp = &sc->parameters; struct ib_recv_wr recv_wr; int rc = -EIO; @@ -1288,7 +1285,7 @@ static int smbd_negotiate(struct smbd_connection *info) sc->status = SMBDIRECT_SOCKET_NEGOTIATE_RUNNING; sc->recv_io.expected = SMBDIRECT_EXPECT_NEGOTIATE_REP; - rc = smbd_post_recv(info, response); + rc = smbd_post_recv(sc, response); log_rdma_event(INFO, "smbd_post_recv rc=%d iov.addr=0x%llx iov.length=%u iov.lkey=0x%x\n", rc, response->sge.addr, response->sge.length, response->sge.lkey); |
