summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSteve French2005-04-29 07:41:11 +0200
committerLinus Torvalds2005-04-29 07:41:11 +0200
commit31ca3bc3c569f9fe02aae6974ac3a9126f14902f (patch)
tree1ee90350d3ad6c2c3d59fa598c1440fcdf5a34e8 /fs/cifs/file.c
parent[PATCH] cifs: handle termination of cifs oplockd kernel thread (diff)
downloadkernel-qcow2-linux-31ca3bc3c569f9fe02aae6974ac3a9126f14902f.tar.gz
kernel-qcow2-linux-31ca3bc3c569f9fe02aae6974ac3a9126f14902f.tar.xz
kernel-qcow2-linux-31ca3bc3c569f9fe02aae6974ac3a9126f14902f.zip
[PATCH] cifs: Do not init smb requests or block when sending requests
if cifsd thread is no longer running to demultixplex responses. Do not send FindClose request when FindFirst failed without reaching end of search. Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 1df26ddf68b1..dde2d251fc3d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -512,7 +512,8 @@ int cifs_closedir(struct inode *inode, struct file *file)
pTcon = cifs_sb->tcon;
cFYI(1, ("Freeing private data in close dir"));
- if (pCFileStruct->srch_inf.endOfSearch == FALSE) {
+ if ((pCFileStruct->srch_inf.endOfSearch == FALSE) &&
+ (pCFileStruct->invalidHandle == FALSE)) {
pCFileStruct->invalidHandle = TRUE;
rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
cFYI(1, ("Closing uncompleted readdir with rc %d",