From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] cifs: clean up checks in cifs_echo_request
Date: Wed, 9 Feb 2011 12:01:42 -0500 [thread overview]
Message-ID: <1297270902-16876-1-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <20110209070041.5d0ca858-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
Follow-on patch to 7e90d705 which is already in Steve's tree...
The check for tcpStatus == CifsGood is not meaningful since it doesn't
indicate whether the NEGOTIATE request has been done. Also, clarify
why we're checking for maxBuf == 0.
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
fs/cifs/connect.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 10011e9..161f24c 100644
--- a/fs/cifs/connect.c
+++ b/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;
--
1.7.4
next prev parent reply other threads:[~2011-02-09 17:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 13:54 [PATCH 0/2] cifs: don't perform SMB echoes on un-negotiated socket Jeff Layton
[not found] ` <1297086876-19165-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-02-07 13:54 ` [PATCH 1/2] cifs: remove checks for ses->status == CifsExiting Jeff Layton
[not found] ` <1297086876-19165-2-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-02-07 17:27 ` Steve French
2011-02-07 13:54 ` [PATCH 2/2] cifs: clarify the meaning of tcpStatus == CifsGood Jeff Layton
[not found] ` <1297086876-19165-3-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-02-08 23:50 ` Steve French
[not found] ` <AANLkTikiPgAbei+p2gnqOmuKdHnLpcYOshz7iqBotm1s-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-09 12:00 ` Jeff Layton
[not found] ` <20110209070041.5d0ca858-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-02-09 17:01 ` Jeff Layton [this message]
2011-02-07 17:42 ` [PATCH 0/2] cifs: don't perform SMB echoes on un-negotiated socket Steve French
[not found] ` <AANLkTi=zs7KZjTnysqxpnGam+2Mv3FRTCKZcY8fB0uFU-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-07 18:20 ` Jeff Layton
[not found] ` <20110207132036.7af97f8f-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-02-07 18:36 ` Steve French
[not found] ` <AANLkTikD-Q9A5VxfkbkL-Yg9CjwCTNSoyA9W2biHCOA2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-07 21:14 ` Jeff Layton
[not found] ` <20110207161414.1694cad0-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-02-07 21:29 ` Steve French
[not found] ` <AANLkTiktLMYNi=crSh+NaE2=6qfWgw=ohLjKhp77sJt+-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-07 21:57 ` Jeff Layton
[not found] ` <20110207165726.7141bb4b-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-02-07 23:59 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297270902-16876-1-git-send-email-jlayton@redhat.com \
--to=jlayton-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox