aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-05-25 14:47:16 +0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 21:55:15 +0400
commitf6d7617862e106affc59c6933099e45629af5c4e (patch)
treee2e6ff0197e1adddb99079580db191955610cf54 /fs/cifs/connect.c
parentCIFS: Add SMB2 support for async requests (diff)
downloadlinux-dev-f6d7617862e106affc59c6933099e45629af5c4e.tar.xz
linux-dev-f6d7617862e106affc59c6933099e45629af5c4e.zip
CIFS: Move echo code to osp struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7b4bc1e0b08e..a83ed766aa94 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -406,15 +406,17 @@ 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, which is indicated by maxBuf != 0. Also, no need to ping if
- * we got a response recently
+ * We cannot send an echo if it is disabled or until the
+ * NEGOTIATE_PROTOCOL request is done, which is indicated by
+ * server->ops->need_neg() == true. Also, no need to ping if
+ * we got a response recently.
*/
if (!server->ops->need_neg || server->ops->need_neg(server) ||
+ (server->ops->can_echo && !server->ops->can_echo(server)) ||
time_before(jiffies, server->lstrp + SMB_ECHO_INTERVAL - HZ))
goto requeue_echo;
- rc = CIFSSMBEcho(server);
+ rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS;
if (rc)
cFYI(1, "Unable to send echo request to server: %s",
server->hostname);