diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsglob.h | 2 | ||||
-rw-r--r-- | fs/cifs/connect.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index edd5b29b53c9..1ab33eb71d95 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -188,6 +188,8 @@ struct TCP_Server_Info { | |||
188 | /* multiplexed reads or writes */ | 188 | /* multiplexed reads or writes */ |
189 | unsigned int maxBuf; /* maxBuf specifies the maximum */ | 189 | unsigned int maxBuf; /* maxBuf specifies the maximum */ |
190 | /* message size the server can send or receive for non-raw SMBs */ | 190 | /* message size the server can send or receive for non-raw SMBs */ |
191 | /* maxBuf is returned by SMB NegotiateProtocol so maxBuf is only 0 */ | ||
192 | /* when socket is setup (and during reconnect) before NegProt sent */ | ||
191 | unsigned int max_rw; /* maxRw specifies the maximum */ | 193 | unsigned int max_rw; /* maxRw specifies the maximum */ |
192 | /* message size the server can send or receive for */ | 194 | /* message size the server can send or receive for */ |
193 | /* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */ | 195 | /* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */ |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 257b6d895e20..10011e99b34d 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -341,7 +341,7 @@ cifs_echo_request(struct work_struct *work) | |||
341 | * We cannot send an echo until the NEGOTIATE_PROTOCOL request is done. | 341 | * We cannot send an echo until the NEGOTIATE_PROTOCOL request is done. |
342 | * Also, no need to ping if we got a response recently | 342 | * Also, no need to ping if we got a response recently |
343 | */ | 343 | */ |
344 | if (server->tcpStatus != CifsGood || | 344 | if ((server->tcpStatus != CifsGood) || (server->maxBuf == 0) || |
345 | time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ)) | 345 | time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ)) |
346 | goto requeue_echo; | 346 | goto requeue_echo; |
347 | 347 | ||