Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312883
b: refs/heads/master
c: 37d7fff
h: refs/heads/master
i:
  312881: 7af57ce
  312879: b8be360
v: v3
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jul 14, 2012
1 parent 26783b4 commit aa7a0c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d7b5aaed7d887b34f29f900244cdbd17a86637c
refs/heads/master: 37d7fffc9cafe75ded8a840fa30ba625f99ed7ae
17 changes: 15 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2254,9 +2254,22 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
if (error < 0)
goto exit;

error = lookup_slow(nd, &nd->last, path);
if (error < 0)
BUG_ON(nd->inode != dir->d_inode);

mutex_lock(&dir->d_inode->i_mutex);
dentry = __lookup_hash(&nd->last, dir, nd);
mutex_unlock(&dir->d_inode->i_mutex);
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
goto exit;
path->mnt = nd->path.mnt;
path->dentry = dentry;
error = follow_managed(path, nd->flags);
if (unlikely(error < 0))
goto exit_dput;

if (error)
nd->flags |= LOOKUP_JUMPED;

inode = path->dentry->d_inode;
}
Expand Down

0 comments on commit aa7a0c0

Please sign in to comment.