Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154376
b: refs/heads/master
c: ad8034f
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Jun 26, 2009
1 parent 5a6dd7a commit d1acdb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f3bc09ee1b7fcadd5bfdc5ed2e1643f658fe23d
refs/heads/master: ad8034f19792736db5c259103c2eaaf72887bbb4
11 changes: 7 additions & 4 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,14 @@ static void cifs_umount_begin(struct super_block *sb)
if (tcon == NULL)
return;

lock_kernel();
read_lock(&cifs_tcp_ses_lock);
if (tcon->tc_count == 1)
if ((tcon->tc_count > 1) || (tcon->tidStatus == CifsExiting)) {
/* we have other mounts to same share or we have
already tried to force umount this and woken up
all waiting network requests, nothing to do */
read_unlock(&cifs_tcp_ses_lock);
return;
} else if (tcon->tc_count == 1)
tcon->tidStatus = CifsExiting;
read_unlock(&cifs_tcp_ses_lock);

Expand All @@ -554,9 +559,7 @@ static void cifs_umount_begin(struct super_block *sb)
wake_up_all(&tcon->ses->server->response_q);
msleep(1);
}
/* BB FIXME - finish add checks for tidStatus BB */

unlock_kernel();
return;
}

Expand Down

0 comments on commit d1acdb3

Please sign in to comment.