summaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-06-18 10:47:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:35:40 +0400
commitb5fb63c18315c5510c1d0636179c057e0c761c77 (patch)
tree19e42c9aa285eb64c277ece4083d4834351b3d5b /fs/proc/base.c
parent408ef013cc9e2f94a14f7ccbbe52ddfb18437a99 (diff)
downloadop-kernel-dev-b5fb63c18315c5510c1d0636179c057e0c761c77.zip
op-kernel-dev-b5fb63c18315c5510c1d0636179c057e0c761c77.tar.gz
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 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3bd5ac1..2772208 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1438,8 +1438,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
if (error)
goto out;
- path_put(&nd->path);
- nd->path = path;
+ nd_jump_link(nd, &path);
return NULL;
out:
return ERR_PTR(error);
OpenPOWER on IntegriCloud