[PATCH 6.12 0750/1276] cifs: Fix missing credit release on failure in cifs_issue_read()
Greg Kroah-Hartman <[email protected]> Tue, 21 Jul 2026 17:19:53 +0200
| Newsgroups | dev.linux.lists.netfs,dev.linux.lists.patches,org.kernel.vger.linux-cifs,org.kernel.vger.linux-fsdevel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells <[email protected]> [ Upstream commit c16b8c4cfb4fe2244cc33e469a93c1ab8684146b ] Fix missing release of credits in the failure path in cifs_issue_read() lest retrying the subreq just overwrites the credits value. Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks") Link: https://sashiko.dev/#/patchset/20260608145432.681865-1-dhowells%40redhat.com Signed-off-by: David Howells <[email protected]> Acked-by: Paulo Alcantara (Red Hat) <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Steve French <[email protected]> Signed-off-by: Sasha Levin <[email protected]> --- fs/smb/client/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 898fb7e293ddc7..70b64df9fb2ebf 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -229,6 +229,7 @@ static void cifs_issue_read(struct netfs_io_subrequest *subreq) return; failed: + add_credits_and_wake_if(rdata->server, &rdata->credits, 0); subreq->error = rc; netfs_read_subreq_terminated(subreq, false); } -- 2.53.0