[PATCH 41/53] CIFS: Disable SMB2.1 protocol negotiating

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

 



From: Pavel Shilovsky <piastryyy@xxxxxxxxx>

because we don't support it now.

Signed-off-by: Pavel Shilovsky <piastryyy@xxxxxxxxx>
---
 fs/cifs/smb2pdu.c   |    2 +-
 fs/cifs/transport.c |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index b349f3d..353bd30 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -525,7 +525,7 @@ static void free_rsp_buf(int resp_buftype, void *pSMB2r)
 		cifs_buf_release(pSMB2r);
 }
 
-#define SMB2_NUM_PROT 2
+#define SMB2_NUM_PROT 1
 
 #define SMB2_PROT   0
 #define SMB21_PROT  1
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 651e77e..504a3c2 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -294,8 +294,11 @@ int wait_for_free_request(struct TCP_Server_Info *server,
 			  (atomic_read(&server->credits) < 1)) {
 			spin_unlock(&GlobalMid_Lock);
 			cifs_num_waiters_inc(server);
-			wait_event(server->request_q,
-				   atomic_read(&server->credits) > 0);
+			if (wait_event_killable(server->request_q,
+				    atomic_read(&server->credits) > 0)) {
+				cifs_num_waiters_dec(server);
+				return -ENOENT;
+			}
 			cifs_num_waiters_dec(server);
 			spin_lock(&GlobalMid_Lock);
 #endif /* CONFIG_CIFS_SMB2 */
-- 
1.7.1

--
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