summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-06-18 18:47:04 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:35:40 +0400
commitb5fb63c18315c5510c1d0636179c057e0c761c77 (patch)
tree19e42c9aa285eb64c277ece4083d4834351b3d5b /include/linux
parent408ef013cc9e2f94a14f7ccbbe52ddfb18437a99 (diff)
downloadlinux-b5fb63c18315c5510c1d0636179c057e0c761c77.tar.xz
fs: add nd_jump_link
Add a helper that abstracts out the jump to an already parsed struct path from ->follow_link operation from procfs. Not only does this clean up the code by moving the two sides of this game into a single helper, but it also prepares for making struct nameidata private to namei.c Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-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 f5931489e150..d2ef8b34b967 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -80,6 +80,8 @@ extern int follow_up(struct path *);
extern struct dentry *lock_rename(struct dentry *, struct dentry *);
extern void unlock_rename(struct dentry *, struct dentry *);
+extern void nd_jump_link(struct nameidata *nd, struct path *path);
+
static inline void nd_set_link(struct nameidata *nd, char *path)
{
nd->saved_names[nd->depth] = path;