summaryrefslogtreecommitdiffstats
path: root/fs/autofs4/waitq.c
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2009-06-11 00:07:47 +0200
committerFelix Blyakher <felixb@sgi.com>2009-06-11 00:07:47 +0200
commit4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7 (patch)
tree0cea46e43f0625244c3d06a71d6559e5ec5419ca /fs/autofs4/waitq.c
parentxfs: prevent deadlock in xfs_qm_shake() (diff)
parentLinux 2.6.30 (diff)
downloadlinux-4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7.tar.xz
linux-4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/autofs4/waitq.c')
-rw-r--r--fs/autofs4/waitq.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index eeb246845909..2341375386f8 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -297,20 +297,14 @@ static int validate_request(struct autofs_wait_queue **wait,
*/
if (notify == NFY_MOUNT) {
/*
- * If the dentry isn't hashed just go ahead and try the
- * mount again with a new wait (not much else we can do).
- */
- if (!d_unhashed(dentry)) {
- /*
- * But if the dentry is hashed, that means that we
- * got here through the revalidate path. Thus, we
- * need to check if the dentry has been mounted
- * while we waited on the wq_mutex. If it has,
- * simply return success.
- */
- if (d_mountpoint(dentry))
- return 0;
- }
+ * If the dentry was successfully mounted while we slept
+ * on the wait queue mutex we can return success. If it
+ * isn't mounted (doesn't have submounts for the case of
+ * a multi-mount with no mount at it's base) we can
+ * continue on and create a new request.
+ */
+ if (have_submounts(dentry))
+ return 0;
}
return 1;