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

autofs4-2.6.34-rc1 - fix link_count usage

After commit 1f36f774 ("Switch !O_CREAT case to use of do_last()") in
2.6.34-rc1 autofs direct mounts stopped working.  This is caused by
current->link_count being 0 when ->follow_link() is called from

I can't work out why this hasn't been seen before Als patch series.

This patch removes the autofs dependence on current->link_count.
Signed-off-by: default avatarIan Kent <>
Cc: Al Viro <>
Signed-off-by: default avatarLinus Torvalds <>
parent b77b907f
......@@ -177,8 +177,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
/* Trigger mount for path component or follow link */
} else if (ino->flags & AUTOFS_INF_PENDING ||
autofs4_need_mount(flags) ||
current->link_count) {
autofs4_need_mount(flags)) {
DPRINTK("waiting for mount name=%.*s",
dentry->d_name.len, dentry->;
......@@ -262,7 +261,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
status = try_to_fill_dentry(dentry, 0);
status = try_to_fill_dentry(dentry, nd->flags);
if (status)
goto out_error;
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