Skip to content

Commit ab83128

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: pass struct smbdirect_socket to post_sendmsg()
This will make it easier to move function to the common code in future. Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 0a715db commit ab83128

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

fs/smb/server/transport_rdma.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,11 +1115,10 @@ static int get_mapped_sg_list(struct ib_device *device, void *buf, int size,
11151115
return ib_dma_map_sg(device, sg_list, npages, dir);
11161116
}
11171117

1118-
static int post_sendmsg(struct smb_direct_transport *t,
1118+
static int post_sendmsg(struct smbdirect_socket *sc,
11191119
struct smbdirect_send_batch *send_ctx,
11201120
struct smbdirect_send_io *msg)
11211121
{
1122-
struct smbdirect_socket *sc = &t->socket;
11231122
int i;
11241123

11251124
for (i = 0; i < msg->num_sge; i++)
@@ -1210,7 +1209,7 @@ static int smb_direct_post_send_data(struct smb_direct_transport *t,
12101209
}
12111210
}
12121211

1213-
ret = post_sendmsg(t, send_ctx, msg);
1212+
ret = post_sendmsg(sc, send_ctx, msg);
12141213
if (ret)
12151214
goto err;
12161215
return 0;
@@ -1688,7 +1687,7 @@ static int smb_direct_send_negotiate_response(struct smb_direct_transport *t,
16881687
sendmsg->sge[0].length = sizeof(*resp);
16891688
sendmsg->sge[0].lkey = sc->ib.pd->local_dma_lkey;
16901689

1691-
ret = post_sendmsg(t, NULL, sendmsg);
1690+
ret = post_sendmsg(sc, NULL, sendmsg);
16921691
if (ret) {
16931692
smb_direct_free_sendmsg(sc, sendmsg);
16941693
return ret;

0 commit comments

Comments
 (0)