mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
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>
This commit is contained in:
parent
9b4a9b14a7
commit
2a73787110
2 changed files with 35 additions and 19 deletions
|
|
@ -18,6 +18,7 @@ enum { MAX_NESTED_LINKS = 8 };
|
|||
struct nameidata {
|
||||
struct path path;
|
||||
struct qstr last;
|
||||
struct path root;
|
||||
unsigned int flags;
|
||||
int last_type;
|
||||
unsigned depth;
|
||||
|
|
|
|||
Loading…
Reference in a new issue