From: Stefan Metzmacher Date: Fri, 22 Aug 2025 08:18:12 +0000 (+0200) Subject: smb: client: pass struct smbdirect_socket to manage_credits_prior_sending() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=869bb7284fb2976b59ad29455cddd44bce0976f7;p=thirdparty%2Fkernel%2Fstable.git smb: client: pass struct smbdirect_socket to manage_credits_prior_sending() This will make it easier to move function to the common code in future. Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Acked-by: Namjae Jeon Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French --- diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 809c529b1b3c1..adebee32442aa 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -957,9 +957,8 @@ dma_mapping_failed: * buffer as possible, and extend the receive credits to remote peer * return value: the new credtis being granted. */ -static int manage_credits_prior_sending(struct smbd_connection *info) +static int manage_credits_prior_sending(struct smbdirect_socket *sc) { - struct smbdirect_socket *sc = &info->socket; int new_credits; if (atomic_read(&sc->recv_io.credits.count) >= sc->recv_io.credits.target) @@ -1127,7 +1126,7 @@ wait_send_queue: packet = smbdirect_send_io_payload(request); packet->credits_requested = cpu_to_le16(sp->send_credit_target); - new_credits = manage_credits_prior_sending(info); + new_credits = manage_credits_prior_sending(sc); atomic_add(new_credits, &sc->recv_io.credits.count); packet->credits_granted = cpu_to_le16(new_credits);