diff mbox

[CIFS] Initialize number of credits to one

Message ID AANLkTinox4ot1D0r4AEOVVdnBtotXa=9RDy8Ohto6s8j@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve French March 16, 2011, 8:20 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 33e11a8..c19f00a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3202,6 +3202,7 @@  int cifs_negotiate_protocol(unsigned int xid,
struct cifs_ses *ses)

 #ifdef CONFIG_CIFS_SMB2
 	if (ses->server->is_smb2) {
+		atomic_set(&server->credits, 1); /* we have one credit to start with */
 		rc = SMB2_negotiate(xid, ses);
 		/* BB we probably don't need to retry with modern servers */