From d1acdb3049dc248554422a9f7768f25f597f9ab4 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 26 Jun 2009 03:25:49 +0000 Subject: [PATCH] --- yaml --- r: 154376 b: refs/heads/master c: ad8034f19792736db5c259103c2eaaf72887bbb4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifsfs.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 593c523f29ce..12c93b177fcf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f3bc09ee1b7fcadd5bfdc5ed2e1643f658fe23d +refs/heads/master: ad8034f19792736db5c259103c2eaaf72887bbb4 diff --git a/trunk/fs/cifs/cifsfs.c b/trunk/fs/cifs/cifsfs.c index b5e9f398c2e5..9f669f982c4d 100644 --- a/trunk/fs/cifs/cifsfs.c +++ b/trunk/fs/cifs/cifsfs.c @@ -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); @@ -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; }