[CIFS] Initialize number of credits to one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before we send the first request, SMB2 Negotiate,
we need to initialize number of credits to its minimum
(one).

Signed-off-by: Steve French <sfrench@xxxxxxxxxx>
---
 fs/cifs/connect.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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 */
 		if (rc == -EAGAIN)

-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux