diff options
| author | Stefan Metzmacher <metze@samba.org> | 2026-01-22 20:16:50 +0300 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-02-09 02:12:58 +0300 |
| commit | bf1656e12a9db2add716c7fb57b56967f69599fa (patch) | |
| tree | 941bf385a2b8a035ae45c2b2ca28c3e830702347 | |
| parent | defb3c05fee94b296eebe05aaea16d2664b00252 (diff) | |
| download | linux-bf1656e12a9db2add716c7fb57b56967f69599fa.tar.xz | |
smb: client: let smbd_post_send() make use of request->wr
We don't need a stack variable in addition.
Cc: <stable@vger.kernel.org> # 6.18.x
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.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 | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 61693b4a83fc..f2ae35a9f047 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1105,7 +1105,6 @@ static int manage_keep_alive_before_sending(struct smbdirect_socket *sc) static int smbd_post_send(struct smbdirect_socket *sc, struct smbdirect_send_io *request) { - struct ib_send_wr send_wr; int rc, i; for (i = 0; i < request->num_sge; i++) { @@ -1121,14 +1120,14 @@ static int smbd_post_send(struct smbdirect_socket *sc, 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; + request->wr.next = NULL; + request->wr.wr_cqe = &request->cqe; + request->wr.sg_list = request->sge; + request->wr.num_sge = request->num_sge; + request->wr.opcode = IB_WR_SEND; + request->wr.send_flags = IB_SEND_SIGNALED; - rc = ib_post_send(sc->ib.qp, &send_wr, NULL); + rc = ib_post_send(sc->ib.qp, &request->wr, NULL); if (rc) { log_rdma_send(ERR, "ib_post_send failed rc=%d\n", rc); smbd_disconnect_rdma_connection(sc); |
