From 1f654da36111e8085ccd7b6d692a859c830ea4fe Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 4 Feb 2011 17:09:50 -0500 Subject: [PATCH] --- yaml --- r: 232944 b: refs/heads/master c: 247ec9b418ba50c9022280035330059364d54540 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/connect.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9e78b7a70594..843352181cb0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e3f0dadb2b44746f6223ce4560406d19e02fb1cc +refs/heads/master: 247ec9b418ba50c9022280035330059364d54540 diff --git a/trunk/fs/cifs/connect.c b/trunk/fs/cifs/connect.c index 1f32a2893b5f..257b6d895e20 100644 --- a/trunk/fs/cifs/connect.c +++ b/trunk/fs/cifs/connect.c @@ -337,8 +337,12 @@ cifs_echo_request(struct work_struct *work) struct TCP_Server_Info *server = container_of(work, struct TCP_Server_Info, echo.work); - /* no need to ping if we got a response recently */ - if (time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ)) + /* + * We cannot send an echo until the NEGOTIATE_PROTOCOL request is done. + * Also, no need to ping if we got a response recently + */ + if (server->tcpStatus != CifsGood || + time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ)) goto requeue_echo; rc = CIFSSMBEcho(server);