Commit be3ca7fe authored by Ian Kent's avatar Ian Kent Committed by Linus Torvalds

[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: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5b160f5e
...@@ -359,7 +359,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -359,7 +359,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
* don't try to mount it again. * don't try to mount it again.
*/ */
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
if (!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) { if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
status = try_to_fill_dentry(dentry, 0); status = try_to_fill_dentry(dentry, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment