Skip to contentSkip to conversation

cifs: Fix missing credit release on failure in cifs_issue_read()

PATCH In review David Howells 3 participants 3 messages Jul 2

Subsystems (4)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

PATCH 1/1 cifs: Fix missing credit release on failure in cifs_issue_read()

Fix missing release of credits in the failure path in cifs_issue_read() lest retrying the subreq just overwrites the credits value.

---
 fs/smb/client/file.c |    1 +
 1 file changed, 1 insertion(+)
fs/smb/client/file.c +1 -0
index 8b25d6c9ec5e..5a25635bc62a 100644
@@ -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);
 }
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · David Howells

Fix missing release of credits in the failure path in cifs_issue_read() lest retrying the subreq just overwrites the credits value.

Quoted 3 lines
---
 fs/smb/client/file.c |    1 +
 1 file changed, 1 insertion(+)
#2 lore raw

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

Quoted 20 lines · Paulo Alcantara
Quoted 11 lines · David Howells

Fix missing release of credits in the failure path in cifs_issue_read() lest retrying the subreq just overwrites the credits value.

Quoted 3 lines
---
 fs/smb/client/file.c |    1 +
 1 file changed, 1 insertion(+)
Signature · 3 lines
Thanks,

Steve