Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298376
b: refs/heads/master
c: ec335e9
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 31, 2012
1 parent 8a682ae commit 45b05f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: d774a058d94d6b0dafada2295ec5221481b07d16
refs/heads/master: ec335e91a4f088d8759c1311d0724e609d1c318e
23 changes: 8 additions & 15 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,35 +1176,28 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
dentry = d_lookup(parent, name);
if (dentry && d_need_lookup(dentry)) {
dentry = d_inode_lookup(parent, dentry, nd);
if (IS_ERR(dentry)) {
mutex_unlock(&dir->i_mutex);
return PTR_ERR(dentry);
}
} else if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) {
goto l;
}
if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) {
status = d_revalidate(dentry, nd);
if (unlikely(status <= 0)) {
if (status < 0) {
mutex_unlock(&dir->i_mutex);
dput(dentry);
return status;
dentry = ERR_PTR(status);
goto l;
}
if (!d_invalidate(dentry)) {
dput(dentry);
dentry = d_alloc_and_lookup(parent, name, nd);
if (IS_ERR(dentry)) {
mutex_unlock(&dir->i_mutex);
return PTR_ERR(dentry);
}
}
}
} else if (!dentry) {
dentry = d_alloc_and_lookup(parent, name, nd);
if (IS_ERR(dentry)) {
mutex_unlock(&dir->i_mutex);
return PTR_ERR(dentry);
}
}
l:
mutex_unlock(&dir->i_mutex);
if (IS_ERR(dentry))
return PTR_ERR(dentry);
goto done;
}
if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE) && need_reval)
Expand Down

0 comments on commit 45b05f8

Please sign in to comment.