aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/namei.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-07 11:49:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:35:59 -0400
commit2a737871108de9ba8930f7650d549f1383767f8b (patch)
treed4a8c5d7da4624c4a8973a4c9369af7a915dca05 /include/linux/namei.h
parent9b4a9b14a793bc69b505ed916051f6f32db13bb8 (diff)
Cache root in nameidata
New field: nd->root. When pathname resolution wants to know the root, check if nd->root.mnt is non-NULL; use nd->root if it is, otherwise copy current->fs->root there. After path_walk() is finished, we check if we'd got a cached value in nd->root and drop it. Before calling path_walk() we should either set nd->root.mnt to NULL *or* copy (and pin down) some path to nd->root. In the latter case we won't be looking at current->fs->root at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r--include/linux/namei.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 518098fe63af..325dd3ad39a0 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -18,6 +18,7 @@ enum { MAX_NESTED_LINKS = 8 };
18struct nameidata { 18struct nameidata {
19 struct path path; 19 struct path path;
20 struct qstr last; 20 struct qstr last;
21 struct path root;
21 unsigned int flags; 22 unsigned int flags;
22 int last_type; 23 int last_type;
23 unsigned depth; 24 unsigned depth;