summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-07 11:53:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:35:59 -0400
commit5b857119538daac7118c1364d7ff3613f12b84d3 (patch)
tree18b85315f6e0e6b4f0c906cf0601593d8df97422 /fs/namei.c
parent2a737871108de9ba8930f7650d549f1383767f8b (diff)
downloadop-kernel-dev-5b857119538daac7118c1364d7ff3613f12b84d3.zip
op-kernel-dev-5b857119538daac7118c1364d7ff3613f12b84d3.tar.gz
Make vfs_path_lookup() use starting point as root
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 88baaf2..4379ef9 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1123,21 +1123,20 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
nd->last_type = LAST_ROOT;
nd->flags = flags;
nd->depth = 0;
- nd->root.mnt = NULL;
nd->path.dentry = dentry;
nd->path.mnt = mnt;
path_get(&nd->path);
+ nd->root = nd->path;
+ path_get(&nd->root);
retval = path_walk(name, nd);
if (unlikely(!retval && !audit_dummy_context() && nd->path.dentry &&
nd->path.dentry->d_inode))
audit_inode(name, nd->path.dentry);
- if (nd->root.mnt) {
- path_put(&nd->root);
- nd->root.mnt = NULL;
- }
+ path_put(&nd->root);
+ nd->root.mnt = NULL;
return retval;
}
OpenPOWER on IntegriCloud