Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312885
b: refs/heads/master
c: 7157486
h: refs/heads/master
i:
  312883: aa7a0c0
v: v3
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jul 14, 2012
1 parent d409b26 commit 9d06a69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 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: b6183df7b294997a748eeb9991daa126986ead12
refs/heads/master: 7157486541bffc0dfec912e21ae639b029dae3d3
27 changes: 5 additions & 22 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,30 +2250,13 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
symlink_ok = 1;
/* we _can_ be in RCU mode here */
error = lookup_fast(nd, &nd->last, path, &inode);
if (unlikely(error)) {
if (error < 0)
goto exit;

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 (likely(!error))
goto finish_lookup;

if (error)
nd->flags |= LOOKUP_JUMPED;
if (error < 0)
goto exit;

inode = path->dentry->d_inode;
}
goto finish_lookup;
BUG_ON(nd->inode != dir->d_inode);
} else {
/* create side of things */
/*
Expand Down

0 comments on commit 9d06a69

Please sign in to comment.