FAILED: Patch "smb: client: let smbd_post_send_negotiate_req() use smbd_post_send()" failed to apply to 6.1-stable tree
Subsystems (4)
Sasha Levin
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 5b1c6149657af840a02885135c700ab42e6aa322 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <[email protected]>
Date: Thu, 22 Jan 2026 18:16:59 +0100
Subject: [PATCH] smb: client: let smbd_post_send_negotiate_req() use
smbd_post_send()
The server has similar logic and it makes sure that request->wr is used instead of a stack struct ib_send_wr send_wr.
This makes sure send_done can see request->wr.send_flags as the next commit will check for IB_SEND_SIGNALED
--- fs/smb/client/smbdirect.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-)
fs/smb/client/smbdirect.c +7 -25
@@ -35,6 +35,10 @@ static void enqueue_reassembly(static struct smbdirect_recv_io *_get_first_reassembly (struct smbdirect_socket *sc); +static int smbd_post_send (struct smbdirect_socket *sc, +struct smbdirect_send_batch *batch, +struct smbdirect_send_io *request); +static int smbd_post_recv (struct smbdirect_socket *sc,struct smbdirect_recv_io *response);
@@ -1021,7 +1025,6 @@ static int smbd_ia_open(static int smbd_post_send_negotiate_req (struct smbdirect_socket *sc) {struct smbdirect_socket_parameters *sp = &sc->parameters; -struct ib_send_wr send_wr;int rc;struct smbdirect_send_io *request;struct smbdirect_negotiate_req *packet;
@@ -1052,33 +1055,12 @@ static int smbd_post_send_negotiate_req(struct smbdirect_socket *sc) request->sge[0 ].length =sizeof (*packet); request->sge[0 ].lkey = sc->ib.pd->local_dma_lkey; -ib_dma_sync_single_for_device ( - sc->ib.dev, request->sge[0 ].addr, - request->sge[0 ].length,DMA_TO_DEVICE ); - - request->cqe.done = send_done; - - send_wr.next =NULL ; - send_wr.wr_cqe = &request->cqe; - send_wr.sg_list = request->sge; - send_wr.num_sge = request->num_sge; - send_wr.opcode =IB_WR_SEND ; - send_wr.send_flags =IB_SEND_SIGNALED ; - -log_rdma_send (INFO ,"sge addr=0x%llx length=%u lkey=0x%x\n" , - request->sge[0 ].addr, - request->sge[0 ].length, request->sge[0 ].lkey); - -atomic_inc (&sc->send_io.pending.count); - rc =ib_post_send (sc->ib.qp, &send_wr,NULL ); + rc =smbd_post_send (sc,NULL , request);if (!rc)return 0 ; -/* if we reach here, post send failed */ -log_rdma_send (ERR ,"ib_post_send failed rc=%d\n" , rc); -atomic_dec (&sc->send_io.pending.count); - -smbd_disconnect_rdma_connection (sc); +if (rc == -EAGAIN ) + rc = -EIO ; dma_mapping_failed:smbd_free_send_io (request);
Signature · 1 line
2.51.0