Skip to content

Commit

Permalink
vfs: don't revalidate just looked up dentry
Browse files Browse the repository at this point in the history
__lookup_hash() calls ->lookup() if the dentry needs lookup and on success
revalidates the dentry (all under dir->i_mutex).

While this is harmless it doesn't make a lot of sense.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Mar 31, 2012
1 parent fa4ee15 commit 3637c05
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/namei.c
Expand Up @@ -1869,9 +1869,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
* __lookup_hash is called with the parent dir's i_mutex already
* held, so we are good to go here.
*/
dentry = d_inode_lookup(base, dentry, nd);
if (IS_ERR(dentry))
return dentry;
return d_inode_lookup(base, dentry, nd);
}

if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) {
Expand Down

0 comments on commit 3637c05

Please sign in to comment.