From efe44327e8a0bf99a7abd04ba2ea2673827a67a4 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 9 Feb 2011 12:01:42 -0500 Subject: [PATCH] --- yaml --- r: 233166 b: refs/heads/master c: 195291e68c2ad59a046fc56d32bf59635b100e5c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/connect.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index f3f2014694c2..7eff12486a88 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e90d705fc9f8c5e3a1549281dce0654d049243b +refs/heads/master: 195291e68c2ad59a046fc56d32bf59635b100e5c diff --git a/trunk/fs/cifs/connect.c b/trunk/fs/cifs/connect.c index 10011e99b34d..161f24ca4f6e 100644 --- a/trunk/fs/cifs/connect.c +++ b/trunk/fs/cifs/connect.c @@ -338,10 +338,11 @@ cifs_echo_request(struct work_struct *work) struct TCP_Server_Info, echo.work); /* - * We cannot send an echo until the NEGOTIATE_PROTOCOL request is done. - * Also, no need to ping if we got a response recently + * We cannot send an echo until the NEGOTIATE_PROTOCOL request is + * done, which is indicated by maxBuf != 0. Also, no need to ping if + * we got a response recently */ - if ((server->tcpStatus != CifsGood) || (server->maxBuf == 0) || + if (server->maxBuf == 0 || time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ)) goto requeue_echo;