]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: let recv_done() queue a refill when the peer is low on credits
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Jan 2026 17:16:49 +0000 (18:16 +0100)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:12:57 +0000 (17:12 -0600)
commitdefb3c05fee94b296eebe05aaea16d2664b00252
tree2c9e5dfff4b56390d2dea726313756f16ac38ae7
parent9911b1ed187a770a43950bf51f340ad4b7beecba
smb: client: let recv_done() queue a refill when the peer is low on credits

In captures I saw that Windows was granting 191 credits in a batch
when its peer posted a lot of messages. We are asking for a
credit target of 255 and 191 is 252*3/4.

So we also use that logic in order to fill the
recv buffers available to the peer.

Fixes: 02548c477a90 ("smb: client: queue post_recv_credits_work also if the peer raises the credit target")
Cc: <stable@vger.kernel.org> # 6.18.x
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c