diff options
author | Steve French <sfrench@us.ibm.com> | 2009-06-24 20:29:21 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-06-24 20:29:21 -0400 |
commit | 268875b9d1dd1bf0b523c59e736da9bc20c8ce1f (patch) | |
tree | 9d2a55c5847aadfbfc1c50617dc469dd40716900 /fs/cifs/cifssmb.c | |
parent | 361ea1ae5451040cd254eee0b6df64581080b2cc (diff) |
[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>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index b84c61d5bca4..58d65a9a79c3 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -729,7 +729,7 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
729 | * the tcon is no longer on the list, so no need to take lock before | 729 | * the tcon is no longer on the list, so no need to take lock before |
730 | * checking this. | 730 | * checking this. |
731 | */ | 731 | */ |
732 | if (tcon->need_reconnect) | 732 | if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) |
733 | return 0; | 733 | return 0; |
734 | 734 | ||
735 | rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon, | 735 | rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon, |