[patch 078/104] cifs: fix check for dead tcon in smb_init

Greg KH
2008-12-03T20:21:49Z

[-- Attachment #1: cifs-fix-check-for-dead-tcon-in-smb_init.patch --]
[-- Type: text/plain, Size: 1031 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------
From: Steve French <sfrench@us.ibm.com>

commit bfb59820ee46616a7bdb4af6b8f7e109646de6ec upstream

This was recently changed to check for need_reconnect, but should
actually be a check for a tidStatus of CifsExiting.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
fs/cifs/cifssmb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -295,7 +295,7 @@ smb_init(int smb_command, int wct, struc
check for tcp and smb session status done differently
for those three - in the calling routine */
if (tcon) {
- if (tcon->need_reconnect) {
+ if (tcon->tidStatus == CifsExiting) {
/* only tree disconnect, open, and write,
(and ulogoff which does not have tcon)
are allowed as we start force umount */