mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
smb: server: pass struct smbdirect_socket to smb_direct_post_send_data()
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
ab83128e65
commit
c0cb9823ac
|
|
@ -135,7 +135,7 @@ static inline int get_buf_page_count(void *buf, int size)
|
|||
|
||||
static void smb_direct_destroy_pools(struct smbdirect_socket *sc);
|
||||
static void smb_direct_post_recv_credits(struct work_struct *work);
|
||||
static int smb_direct_post_send_data(struct smb_direct_transport *t,
|
||||
static int smb_direct_post_send_data(struct smbdirect_socket *sc,
|
||||
struct smbdirect_send_batch *send_ctx,
|
||||
struct kvec *iov, int niov,
|
||||
int remaining_data_length);
|
||||
|
|
@ -270,13 +270,11 @@ static void smb_direct_send_immediate_work(struct work_struct *work)
|
|||
{
|
||||
struct smbdirect_socket *sc =
|
||||
container_of(work, struct smbdirect_socket, idle.immediate_work);
|
||||
struct smb_direct_transport *t =
|
||||
container_of(sc, struct smb_direct_transport, socket);
|
||||
|
||||
if (sc->status != SMBDIRECT_SOCKET_CONNECTED)
|
||||
return;
|
||||
|
||||
smb_direct_post_send_data(t, NULL, NULL, 0, 0);
|
||||
smb_direct_post_send_data(sc, NULL, NULL, 0, 0);
|
||||
}
|
||||
|
||||
static void smb_direct_idle_connection_timer(struct work_struct *work)
|
||||
|
|
@ -1153,12 +1151,11 @@ static int post_sendmsg(struct smbdirect_socket *sc,
|
|||
return smb_direct_post_send(sc, &msg->wr);
|
||||
}
|
||||
|
||||
static int smb_direct_post_send_data(struct smb_direct_transport *t,
|
||||
static int smb_direct_post_send_data(struct smbdirect_socket *sc,
|
||||
struct smbdirect_send_batch *send_ctx,
|
||||
struct kvec *iov, int niov,
|
||||
int remaining_data_length)
|
||||
{
|
||||
struct smbdirect_socket *sc = &t->socket;
|
||||
int i, j, ret;
|
||||
struct smbdirect_send_io *msg;
|
||||
int data_length;
|
||||
|
|
@ -1337,7 +1334,7 @@ static int smb_direct_writev(struct ksmbd_transport *t,
|
|||
|
||||
remaining_data_length -= bytes;
|
||||
|
||||
ret = smb_direct_post_send_data(st, &send_ctx,
|
||||
ret = smb_direct_post_send_data(sc, &send_ctx,
|
||||
vecs, nvecs,
|
||||
remaining_data_length);
|
||||
if (unlikely(ret)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user