summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-04-28 11:50:56 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-04-28 22:54:12 +0200
commitf008b2b9ac46014c18036a3ed6c5e73cf4c3477b (patch)
treef9a19782b816b3b918ca51933fac7d65e7c1340c /fs
parentf4c30135fddb7d23d26f722b6f50e251d8764414 (diff)
downloadlwn-f008b2b9ac46014c18036a3ed6c5e73cf4c3477b.tar.gz
lwn-f008b2b9ac46014c18036a3ed6c5e73cf4c3477b.zip
fs: namespace: Fix potential deadlock
do_unmount() does a lock() instead of unlock() in a return path which will lead to a dead lock when this code path is taken. Fix the typo. Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 5459a05e8aa5..1a9232356ef9 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1233,7 +1233,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
*/
vfsmount_write_lock();
if (count_mnt_count(mnt) != 2) {
- vfsmount_write_lock();
+ vfsmount_write_unlock();
return -EBUSY;
}
vfsmount_write_unlock();