From: Ian Kent Date: Fri, 29 Sep 2006 09:00:53 +0000 (-0700) Subject: [PATCH] autofs4: autofs4_follow_link false negative fix X-Git-Tag: v2.6.19-rc1~721 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be3ca7fecb1a9903c6253f49aec0af2a0f3a04e4;p=linux-2.6 [PATCH] autofs4: autofs4_follow_link false negative fix The check for an empty directory in the autofs4_follow_link method fails occassionally due to old dentrys. We had the same problem autofs4_revalidate ages ago. I thought we wouldn't need this in autofs4_follow_link, silly me. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 27e17f96ca..0ec2483523 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -359,7 +359,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) * don't try to mount it again. */ spin_lock(&dcache_lock); - if (!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) { + if (!d_mountpoint(dentry) && __simple_empty(dentry)) { spin_unlock(&dcache_lock); status = try_to_fill_dentry(dentry, 0);