mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: devirtualize ->m_dirnameops
Instead of causing a relatively expensive indirect call for each hashing and comparism of a file name in a directory just use an inline function and a simple branch on the ASCII CI bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: fix unused variable warning] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
537dabcfdb
commit
d8d11fc703
10 changed files with 42 additions and 58 deletions
|
@ -236,7 +236,7 @@ __xfs_dir3_data_check(
|
|||
((char *)dep - (char *)hdr));
|
||||
name.name = dep->name;
|
||||
name.len = dep->namelen;
|
||||
hash = mp->m_dirnameops->hashname(&name);
|
||||
hash = xfs_dir2_hashname(mp, &name);
|
||||
for (i = 0; i < be32_to_cpu(btp->count); i++) {
|
||||
if (be32_to_cpu(lep[i].address) == addr &&
|
||||
be32_to_cpu(lep[i].hashval) == hash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue