Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3637c05d authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

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: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent fa4ee159
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)) {