Linux filesystem development
 help / color / mirror / Atom feed
* [PATCH] cifs: Fix missing credit release on failure in cifs_issue_read()
@ 2026-07-02  8:25 David Howells
  2026-07-02 12:53 ` Paulo Alcantara
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2026-07-02  8:25 UTC (permalink / raw)
  To: Steve French
  Cc: dhowells, Paulo Alcantara, Christian Brauner, linux-cifs, netfs,
	linux-fsdevel, linux-kernel

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 <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
---
 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 8b25d6c9ec5e..5a25635bc62a 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -241,6 +241,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);
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: Fix missing credit release on failure in cifs_issue_read()
  2026-07-02  8:25 [PATCH] cifs: Fix missing credit release on failure in cifs_issue_read() David Howells
@ 2026-07-02 12:53 ` Paulo Alcantara
  2026-07-02 14:22   ` Steve French
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Alcantara @ 2026-07-02 12:53 UTC (permalink / raw)
  To: David Howells, Steve French
  Cc: dhowells, Christian Brauner, linux-cifs, netfs, linux-fsdevel,
	linux-kernel

David Howells <dhowells@redhat.com> writes:

> 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 <dhowells@redhat.com>
> cc: Steve French <sfrench@samba.org>
> cc: Paulo Alcantara <pc@manguebit.org>
> cc: linux-cifs@vger.kernel.org
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org
> ---
>  fs/smb/client/file.c |    1 +
>  1 file changed, 1 insertion(+)

Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: Fix missing credit release on failure in cifs_issue_read()
  2026-07-02 12:53 ` Paulo Alcantara
@ 2026-07-02 14:22   ` Steve French
  0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2026-07-02 14:22 UTC (permalink / raw)
  To: Paulo Alcantara
  Cc: David Howells, Steve French, Christian Brauner, linux-cifs, netfs,
	linux-fsdevel, linux-kernel

merged into cifs-2.6.git for-next pending testing

On Thu, Jul 2, 2026 at 7:53 AM Paulo Alcantara <pc@manguebit.org> wrote:
>
> David Howells <dhowells@redhat.com> writes:
>
> > 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 <dhowells@redhat.com>
> > cc: Steve French <sfrench@samba.org>
> > cc: Paulo Alcantara <pc@manguebit.org>
> > cc: linux-cifs@vger.kernel.org
> > cc: netfs@lists.linux.dev
> > cc: linux-fsdevel@vger.kernel.org
> > ---
> >  fs/smb/client/file.c |    1 +
> >  1 file changed, 1 insertion(+)
>
> Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-02 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  8:25 [PATCH] cifs: Fix missing credit release on failure in cifs_issue_read() David Howells
2026-07-02 12:53 ` Paulo Alcantara
2026-07-02 14:22   ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox