From 1f6573dcd86654d5058cb54d0de011c704dde340 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 5 Sep 2011 18:06:26 +0200 Subject: [PATCH] --- yaml --- r: 263687 b: refs/heads/master c: 0ec26fd0698285b31248e34bf1abb022c00f23d6 h: refs/heads/master i: 263685: 1e27e07b19344f95c69bc37ba3a942cf93bf624e 263683: b1998056358461066fb858816e3a93364ceac64d 263679: 9b318b91cac13ec4f1a72906664d6aaf2ee7aab4 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index f64a7cbdf8dd..639728cd7a80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4e436e0bd480668834fe6849a52c5397b7be4fb +refs/heads/master: 0ec26fd0698285b31248e34bf1abb022c00f23d6 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 2826db35dc25..b52bc685465f 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -727,25 +727,22 @@ static int follow_automount(struct path *path, unsigned flags, if ((flags & LOOKUP_NO_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. + /* We don't want to mount if someone's just doing a stat - + * unless they're stat'ing a directory and appended a '/' to + * the name. + * + * 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_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; - } + 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;