Skip to content

Commit

Permalink
[CIFS] Do not send tree disconnect if session is already disconnected
Browse files Browse the repository at this point in the history
Noticed this when tree connect timed out (due to Samba server crash) -
we try to send a tree disconnect for a tid that does not exist
since we don't have a valid tree id yet. This checks that the
session is valid before sending the tree disconnect to handle
this case.

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Jun 25, 2009
1 parent 361ea1a commit 268875b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/cifs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ client generated ones by default (mount option "serverino" turned
on by default if server supports it). Add forceuid and forcegid
mount options (so that when negotiating unix extensions specifying
which uid mounted does not immediately force the server's reported
uids to be overridden).
uids to be overridden). Add support for scope moutn parm.

Version 1.58
------------
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon)
* the tcon is no longer on the list, so no need to take lock before
* checking this.
*/
if (tcon->need_reconnect)
if ((tcon->need_reconnect) || (tcon->ses->need_reconnect))
return 0;

rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon,
Expand Down

0 comments on commit 268875b

Please sign in to comment.