mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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>
This commit is contained in:
parent
0a715db380
commit
ab83128e65
|
|
@ -1115,11 +1115,10 @@ static int get_mapped_sg_list(struct ib_device *device, void *buf, int size,
|
|||
return ib_dma_map_sg(device, sg_list, npages, dir);
|
||||
}
|
||||
|
||||
static int post_sendmsg(struct smb_direct_transport *t,
|
||||
static int post_sendmsg(struct smbdirect_socket *sc,
|
||||
struct smbdirect_send_batch *send_ctx,
|
||||
struct smbdirect_send_io *msg)
|
||||
{
|
||||
struct smbdirect_socket *sc = &t->socket;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < msg->num_sge; i++)
|
||||
|
|
@ -1210,7 +1209,7 @@ static int smb_direct_post_send_data(struct smb_direct_transport *t,
|
|||
}
|
||||
}
|
||||
|
||||
ret = post_sendmsg(t, send_ctx, msg);
|
||||
ret = post_sendmsg(sc, send_ctx, msg);
|
||||
if (ret)
|
||||
goto err;
|
||||
return 0;
|
||||
|
|
@ -1688,7 +1687,7 @@ static int smb_direct_send_negotiate_response(struct smb_direct_transport *t,
|
|||
sendmsg->sge[0].length = sizeof(*resp);
|
||||
sendmsg->sge[0].lkey = sc->ib.pd->local_dma_lkey;
|
||||
|
||||
ret = post_sendmsg(t, NULL, sendmsg);
|
||||
ret = post_sendmsg(sc, NULL, sendmsg);
|
||||
if (ret) {
|
||||
smb_direct_free_sendmsg(sc, sendmsg);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user