[CIFS] Do not send tree disconnect if session is already disconnected
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>
This commit is contained in:
@@ -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,
|
||||
|
Fai riferimento in un nuovo problema
Block a user