summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorSteve French2005-10-10 23:06:37 +0200
committerSteve French2005-10-10 23:06:37 +0200
commit5e1253b50111220f06ee13bc4e555d89ff39176b (patch)
tree3386f365db264fad206e9e019025aab1e6a5f8fa /fs/cifs/cifsfs.c
parent[CIFS] Update cifs version to 1.38 (diff)
downloadkernel-qcow2-linux-5e1253b50111220f06ee13bc4e555d89ff39176b.tar.gz
kernel-qcow2-linux-5e1253b50111220f06ee13bc4e555d89ff39176b.tar.xz
kernel-qcow2-linux-5e1253b50111220f06ee13bc4e555d89ff39176b.zip
[CIFS] Correct cifs tcp retry when some data sent before getting EAGAIN.
Continue implementation of cifs umount begin to allow force unmounts of cifs mounts. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e3177a031edc..fd5eae37f2a8 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -407,9 +407,24 @@ static struct quotactl_ops cifs_quotactl_ops = {
static void cifs_umount_begin(struct super_block * sblock)
{
- cERROR(1,("kill all tasks now - umount begin not implemented yet"));
+ struct cifs_sb_info *cifs_sb;
-/* BB FIXME - finish BB */
+ cifs_sb = CIFS_SB(sb);
+ if(cifs_sb == NULL)
+ return -EIO;
+ if(cifs_sb->tcon == NULL)
+ return -EIO;
+ down(&tcon->tconSem);
+ if (atomic_read(&tcon->useCount) == 1)
+ tcon->tidStatus = CifsExiting;
+ up(&tcon->tconSem);
+
+ if((cifs->sb->tcon->ses) && (cifs_sb->tcon->ses->server))
+ {
+ cERROR(1,("wake up tasks now - umount begin not complete"));
+ wake_up_all(&server->request_q);
+ }
+/* BB FIXME - finish add checks for tidStatus BB */
return;
}