aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-29 20:55:11 -0800
committerSteve French <sfrench@us.ibm.com>2005-11-29 20:55:11 -0800
commit6ab16d249513a50bef3f1b275cea6aa8d3f51832 (patch)
tree6440fb91b6336e3dc988f06d951ab272610000fb /fs/cifs/cifssmb.c
parent6473a559c336d5c407f9df412ca2f55357767ff8 (diff)
[CIFS] Fix umount --force to wake up the pending response queue, not just
the request queue. Also periodically wakeup response_q so threads can check if stuck requests have timed out. Workaround Windows server illegal smb length on transact2 findfirst response. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index d179b0c3eee..6867e556d37 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -90,6 +90,18 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
check for tcp and smb session status done differently
for those three - in the calling routine */
if(tcon) {
+ if(tcon->tidStatus == CifsExiting) {
+ /* only tree disconnect, open, and write,
+ (and ulogoff which does not have tcon)
+ are allowed as we start force umount */
+ if((smb_command != SMB_COM_WRITE_ANDX) &&
+ (smb_command != SMB_COM_OPEN_ANDX) &&
+ (smb_command != SMB_COM_TREE_DISCONNECT)) {
+ cFYI(1,("can not send cmd %d while umounting",
+ smb_command));
+ return -ENODEV;
+ }
+ }
if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
(tcon->ses->server)){
struct nls_table *nls_codepage;
@@ -187,6 +199,19 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
check for tcp and smb session status done differently
for those three - in the calling routine */
if(tcon) {
+ if(tcon->tidStatus == CifsExiting) {
+ /* only tree disconnect, open, and write,
+ (and ulogoff which does not have tcon)
+ are allowed as we start force umount */
+ if((smb_command != SMB_COM_WRITE_ANDX) &&
+ (smb_command != SMB_COM_OPEN_ANDX) &&
+ (smb_command != SMB_COM_TREE_DISCONNECT)) {
+ cFYI(1,("can not send cmd %d while umounting",
+ smb_command));
+ return -ENODEV;
+ }
+ }
+
if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
(tcon->ses->server)){
struct nls_table *nls_codepage;