mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
408ef013cc
commit
b5fb63c183
3 changed files with 20 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue