summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-08 21:16:28 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-08 21:16:28 -0500
commitb306419ae08d9def53f2142a37cc0a58622307a8 (patch)
tree8d3e6a51b05f39230a968e0655162f560f6c3c42 /fs/namei.c
parentdfef6dcd35cb4a251f6322ca9b2c06f0bb1aa1f4 (diff)
downloadlwn-b306419ae08d9def53f2142a37cc0a58622307a8.tar.gz
lwn-b306419ae08d9def53f2142a37cc0a58622307a8.zip
nd->inode is not set on the second attempt in path_walk()
We leave it at whatever it had been pointing to after the first link_path_walk() had failed with -ESTALE. Things do not work well after that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a5e844fe4b28..a4689eb2df28 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1546,6 +1546,7 @@ static int path_walk(const char *name, struct nameidata *nd)
/* nd->path had been dropped */
current->total_link_count = 0;
nd->path = save;
+ nd->inode = save.dentry->d_inode;
path_get(&nd->path);
nd->flags |= LOOKUP_REVAL;
result = link_path_walk(name, nd);