mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
smb: server: pass struct smbdirect_socket to wait_for_credits()
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
d14910bbf6
commit
7f4805b7db
|
|
@ -956,11 +956,10 @@ static int smb_direct_flush_send_list(struct smbdirect_socket *sc,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int wait_for_credits(struct smb_direct_transport *t,
|
||||
static int wait_for_credits(struct smbdirect_socket *sc,
|
||||
wait_queue_head_t *waitq, atomic_t *total_credits,
|
||||
int needed)
|
||||
{
|
||||
struct smbdirect_socket *sc = &t->socket;
|
||||
int ret;
|
||||
|
||||
do {
|
||||
|
|
@ -992,14 +991,14 @@ static int wait_for_send_credits(struct smb_direct_transport *t,
|
|||
return ret;
|
||||
}
|
||||
|
||||
return wait_for_credits(t, &sc->send_io.credits.wait_queue, &sc->send_io.credits.count, 1);
|
||||
return wait_for_credits(sc, &sc->send_io.credits.wait_queue, &sc->send_io.credits.count, 1);
|
||||
}
|
||||
|
||||
static int wait_for_rw_credits(struct smb_direct_transport *t, int credits)
|
||||
{
|
||||
struct smbdirect_socket *sc = &t->socket;
|
||||
|
||||
return wait_for_credits(t,
|
||||
return wait_for_credits(sc,
|
||||
&sc->rw_io.credits.wait_queue,
|
||||
&sc->rw_io.credits.count,
|
||||
credits);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user