From 5af86ae0b884dade2c683c1291ad92ed420f0e3f Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Tue, 9 Jun 2009 16:26:24 -0700 Subject: [PATCH] --- yaml --- r: 145566 b: refs/heads/master c: 463aea1a1c49f1a7d4b50656dfd6c8bb33358b1b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/autofs4/waitq.c | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 8a2d5d491bc8..7ce1ba84f49a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 586c7e6a280580fd94b662bf486f9bb31098d14b +refs/heads/master: 463aea1a1c49f1a7d4b50656dfd6c8bb33358b1b diff --git a/trunk/fs/autofs4/waitq.c b/trunk/fs/autofs4/waitq.c index eeb246845909..2341375386f8 100644 --- a/trunk/fs/autofs4/waitq.c +++ b/trunk/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;