summaryrefslogtreecommitdiff
path: root/include/linux/namei.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-02-22 15:50:10 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-14 09:15:24 -0400
commit16c2cd7179881d5dd87779512ca5a0d657c64f62 (patch)
tree822d14ecf505cb3f53e2afe3e1e7867bb32ca346 /include/linux/namei.h
parentfe479a580dc9c737c4eb49ff7fdb31d41d2c7003 (diff)
downloadlwn-16c2cd7179881d5dd87779512ca5a0d657c64f62.tar.gz
lwn-16c2cd7179881d5dd87779512ca5a0d657c64f62.zip
untangle the "need_reval_dot" mess
instead of ad-hackery around need_reval_dot(), do the following: set a flag (LOOKUP_JUMPED) in the beginning of path, on absolute symlink traversal, on ".." and on procfs-style symlinks. Clear on normal components, leave unchanged on ".". Non-nested callers of link_path_walk() call handle_reval_path(), which checks that flag is set and that fs does want the final revalidate thing, then does ->d_revalidate(). In link_path_walk() all the return_reval stuff is gone. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r--include/linux/namei.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 58ce3433d4ec..265378a707bd 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -63,6 +63,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
#define LOOKUP_EXCL 0x0400
#define LOOKUP_RENAME_TARGET 0x0800
+#define LOOKUP_JUMPED 0x1000
+
extern int user_path_at(int, const char __user *, unsigned, struct path *);
#define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path)