smb: server: manage recv credits by counting posted recv_io and granted credits
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Aug 2025 14:05:47 +0000 (16:05 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:52 +0000 (18:29 -0500)
commit89b021a72663c4d96d8a8b85272bb42d991a1c6f
tree4d13fd3b9c77c0aa3a8672233a6e2cfeff0d7495
parent113ed9d56f63d2e4eb3d74002c3d91de1e7a3485
smb: server: manage recv credits by counting posted recv_io and granted credits

(At least for me) the logic maintaining the count of posted
recv_io messages and the count of granted credits is much
easier to understand.

From there we can easily calculate the number of new_credits we'll
grant to the peer in outgoing send_io messages.

This will simplify the move to common logic that can be
shared between client and server in the following patches.

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>
fs/smb/server/transport_rdma.c