Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 195291e6 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

cifs: clean up checks in cifs_echo_request



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: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 7e90d705
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;