Commit 3637c05d881b2b7bab36f339245b8963f5b29c9f
Committed by
Al Viro
1 parent
fa4ee15951
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff
fs/namei.c
... | ... | @@ -1869,9 +1869,7 @@ |
1869 | 1869 | * __lookup_hash is called with the parent dir's i_mutex already |
1870 | 1870 | * held, so we are good to go here. |
1871 | 1871 | */ |
1872 | - dentry = d_inode_lookup(base, dentry, nd); | |
1873 | - if (IS_ERR(dentry)) | |
1874 | - return dentry; | |
1872 | + return d_inode_lookup(base, dentry, nd); | |
1875 | 1873 | } |
1876 | 1874 | |
1877 | 1875 | if (dentry && (dentry->d_flags & DCACHE_OP_REVALIDATE)) { |