summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2010-05-07 17:39:13 -0700
committerThomas Gleixner <tglx@linutronix.de>2010-05-10 14:37:30 +0200
commit6b568a0996c6fd2b833012719788f8d27c7a76d7 (patch)
treeeb9ec5604976330b7605504a551d63ffe030428e /fs
parentc54c0715ea8f4411b0bdafd56db70c58b71e6ae6 (diff)
downloadlwn-6b568a0996c6fd2b833012719788f8d27c7a76d7.tar.gz
lwn-6b568a0996c6fd2b833012719788f8d27c7a76d7.zip
autofs: Remove deadlock
Apparently the conversion from using the dcache_lock -> autofs4_lock forgot that this function already grabs the autofs_lock for a small moment, so we end up grabbing the lock, then a moment later grab it again. Splat. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Nick Piggin <npiggin@suse.de> Cc: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU> LKML-Reference: <1273279153.2776.7.camel@localhost.localdomain> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/autofs4/root.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 5b260883d103..a7eaa32c6bae 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -438,12 +438,10 @@ static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd)
}
/* Check for a non-mountpoint directory with no contents */
- spin_lock(&autofs4_lock);
if (S_ISDIR(dentry->d_inode->i_mode) &&
!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) {
DPRINTK("dentry=%p %.*s, emptydir",
dentry, dentry->d_name.len, dentry->d_name.name);
- spin_unlock(&autofs4_lock);
if (autofs4_need_mount(flags) || current->link_count) {
int status;