]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: pass struct smbdirect_socket to manage_credits_prior_sending()
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Aug 2025 08:18:12 +0000 (10:18 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:50 +0000 (18:29 -0500)
This will make it easier to move function to the common code
in future.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c

index 809c529b1b3c158b4dc72af1be19ba5bc4c6b6d7..adebee32442aacef882da560e3af3817caf658d6 100644 (file)
@@ -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);