Ignore symlink advice (LOOKUP_FOLLOW) when walking the terminal component of a path. Base the decision entirely on LOOKUP_NO_AUTOMOUNT as this is now set (or not) by the callers of path walk, most notably the relevant syscall handlers. Signed-off-by: David Howells <dhowells@xxxxxxxxxx> --- fs/namei.c | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index c2a2cc3..89e3dc3 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -727,25 +727,6 @@ static int follow_automount(struct path *path, unsigned flags, if (!(flags & LOOKUP_AUTOMOUNT) && !(flags & LOOKUP_PARENT)) return -EISDIR; /* we actually want to stop here */ - /* - * We don't want to mount if someone's just doing a stat and they've - * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and - * appended a '/' to the name. - */ - if (!(flags & LOOKUP_FOLLOW)) { - /* We do, however, want to mount if someone wants to open or - * create a file of any type under the mountpoint, wants to - * traverse through the mountpoint or wants to open the mounted - * directory. - * Also, autofs may mark negative dentries as being automount - * points. These will need the attentions of the daemon to - * instantiate them before they can be used. - */ - if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | - LOOKUP_OPEN | LOOKUP_CREATE)) && - path->dentry->d_inode) - return -EISDIR; - } current->total_link_count++; if (current->total_link_count >= 40) return -ELOOP; -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html