]> git.baikalelectronics.ru Git - kernel.git/commit
dcache: move the DCACHE_OP_COMPARE case out of the __d_lookup_rcu loop
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Aug 2022 22:29:46 +0000 (15:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Aug 2022 21:33:03 +0000 (14:33 -0700)
commitee2f9f4aeab064a1a843eb3cf3da63d516e5eb09
tree51da9f88acd77e76e35b6aabf0e5968081b8c110
parent3c1e628e893eecd4b69ee4fc1d7c8b3b89ef6182
dcache: move the DCACHE_OP_COMPARE case out of the __d_lookup_rcu loop

__d_lookup_rcu() is one of the hottest functions in the kernel on
certain loads, and it is complicated by filesystems that might want to
have their own name compare function.

We can improve code generation by moving the test of DCACHE_OP_COMPARE
outside the loop, which makes the loop itself much simpler, at the cost
of some code duplication.  But both cases end up being simpler, and the
"native" direct case-sensitive compare particularly so.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dcache.c