From 3354616f7e1a99d285a5f2692312a1dd92fc1850 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 7 Apr 2009 11:53:49 -0400 Subject: [PATCH] --- yaml --- r: 147812 b: refs/heads/master c: 5b857119538daac7118c1364d7ff3613f12b84d3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 3829429e47ef..f85061e85d9b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a737871108de9ba8930f7650d549f1383767f8b +refs/heads/master: 5b857119538daac7118c1364d7ff3613f12b84d3 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 88baaf2b9167..4379ef989709 100644 --- a/trunk/fs/namei.c +++ b/trunk/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; }