Skip to content

cifs: don't perform SMB echoes on un-negotiated socket

Jeff Layton linux-cifs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cifs: remove checks for ses->status == CifsExitingfs/cifs/cifssmb.c+1 -41 reply
2/2cifs: clarify the meaning of tcpStatus == CifsGoodfs/cifs/cifsglob.h fs/cifs/cifssmb.c fs/cifs/connect.c+8 -73 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchJG
1/2T-b
2/2Reported-and-Tested-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] cifs: don't perform SMB echoes on un-negotiated socket

Commit 247ec9b4 makes the SMB echo workqueue job skip doing echoes unless the tcpStatus == CifsGood. Problem: tcpStatus == CifsGood is not a reliable indicator of whether the socket has had a NEGOTIATE done on it. This fixes that by adding a new tcpStatus of CifsNeedNegotiate that indicates this. It also cleans up cifs_reconnect_tcon a bit.

This is not the only way to fix this issue. As Steve pointed out to me, we could also check to see whether there's a valid SMB session on the list as an indicator of whether a NEGOTIATE has been done. I think the approach I'm proposing clarifies the code better, but I'm willing to go with his approach if that's the general concensus.

JG reported this problem and tested the patch and stated that it fixed the problem for him.

Comments and suggestions welcome...

Jeff Layton (2):
cifs: remove checks for ses->status == CifsExiting
cifs: clarify the meaning of tcpStatus == CifsGood

 fs/cifs/cifsglob.h |    3 ++-
 fs/cifs/cifssmb.c  |    9 +++------
 fs/cifs/connect.c  |    8 ++++----
 3 files changed, 9 insertions(+), 11 deletions(-)
Signature · 1 line
1.7.4