mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
smb: server: pass struct smbdirect_socket to smb_direct_flush_send_list()
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
ecb56dbc93
commit
d14910bbf6
|
|
@ -916,11 +916,10 @@ static void smb_direct_send_ctx_init(struct smbdirect_send_batch *send_ctx,
|
|||
send_ctx->remote_key = remote_key;
|
||||
}
|
||||
|
||||
static int smb_direct_flush_send_list(struct smb_direct_transport *t,
|
||||
static int smb_direct_flush_send_list(struct smbdirect_socket *sc,
|
||||
struct smbdirect_send_batch *send_ctx,
|
||||
bool is_last)
|
||||
{
|
||||
struct smbdirect_socket *sc = &t->socket;
|
||||
struct smbdirect_send_io *first, *last;
|
||||
int ret;
|
||||
|
||||
|
|
@ -988,7 +987,7 @@ static int wait_for_send_credits(struct smb_direct_transport *t,
|
|||
|
||||
if (send_ctx &&
|
||||
(send_ctx->wr_cnt >= 16 || atomic_read(&sc->send_io.credits.count) <= 1)) {
|
||||
ret = smb_direct_flush_send_list(t, send_ctx, false);
|
||||
ret = smb_direct_flush_send_list(sc, send_ctx, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1358,7 +1357,7 @@ static int smb_direct_writev(struct ksmbd_transport *t,
|
|||
}
|
||||
|
||||
done:
|
||||
ret = smb_direct_flush_send_list(st, &send_ctx, true);
|
||||
ret = smb_direct_flush_send_list(sc, &send_ctx, true);
|
||||
if (unlikely(!ret && error))
|
||||
ret = error;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user