diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-03-26 12:54:20 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-31 16:03:16 -0400 |
commit | 3637c05d881b2b7bab36f339245b8963f5b29c9f (patch) | |
tree | 771ea8149d971517934d7023a6f3d34ccc42068f | |
parent | fa4ee159512ee39b6c65ac40db986ea7a2f7de60 (diff) | |
download | linux-stable-3637c05d881b2b7bab36f339245b8963f5b29c9f.tar.gz linux-stable-3637c05d881b2b7bab36f339245b8963f5b29c9f.tar.bz2 linux-stable-3637c05d881b2b7bab36f339245b8963f5b29c9f.zip |
vfs: don't revalidate just looked up dentry
__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>
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 768f2366bddd..82f9568d315d 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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)) { |