From: Al Viro Date: Tue, 7 Apr 2009 15:53:49 +0000 (-0400) Subject: Make vfs_path_lookup() use starting point as root X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b857119538daac7118c1364d7ff3613f12b84d3;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Make vfs_path_lookup() use starting point as root Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index 88baaf2b9167..4379ef989709 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; }