Skip to content

Commit bf1656e

Browse files
metze-sambasmfrench
authored andcommitted
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>
1 parent defb3c0 commit bf1656e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

fs/smb/client/smbdirect.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,6 @@ static int manage_keep_alive_before_sending(struct smbdirect_socket *sc)
11051105
static int smbd_post_send(struct smbdirect_socket *sc,
11061106
struct smbdirect_send_io *request)
11071107
{
1108-
struct ib_send_wr send_wr;
11091108
int rc, i;
11101109

11111110
for (i = 0; i < request->num_sge; i++) {
@@ -1121,14 +1120,14 @@ static int smbd_post_send(struct smbdirect_socket *sc,
11211120

11221121
request->cqe.done = send_done;
11231122

1124-
send_wr.next = NULL;
1125-
send_wr.wr_cqe = &request->cqe;
1126-
send_wr.sg_list = request->sge;
1127-
send_wr.num_sge = request->num_sge;
1128-
send_wr.opcode = IB_WR_SEND;
1129-
send_wr.send_flags = IB_SEND_SIGNALED;
1123+
request->wr.next = NULL;
1124+
request->wr.wr_cqe = &request->cqe;
1125+
request->wr.sg_list = request->sge;
1126+
request->wr.num_sge = request->num_sge;
1127+
request->wr.opcode = IB_WR_SEND;
1128+
request->wr.send_flags = IB_SEND_SIGNALED;
11301129

1131-
rc = ib_post_send(sc->ib.qp, &send_wr, NULL);
1130+
rc = ib_post_send(sc->ib.qp, &request->wr, NULL);
11321131
if (rc) {
11331132
log_rdma_send(ERR, "ib_post_send failed rc=%d\n", rc);
11341133
smbd_disconnect_rdma_connection(sc);

0 commit comments

Comments
 (0)