summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_da_btree.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-11 12:59:26 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-13 11:13:45 -0800
commitd8d11fc703a22bbe3939e08b08396fa6b816719a (patch)
treec789218ef554cba3fb0f0dfd22cf7cc6895d9714 /fs/xfs/libxfs/xfs_da_btree.c
parent537dabcfdbc1513408b156a80a6cfa03ea7d4d3f (diff)
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_da_btree.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
index 418189498234..e424b004e3cb 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -12,9 +12,9 @@
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
+#include "xfs_inode.h"
#include "xfs_dir2.h"
#include "xfs_dir2_priv.h"
-#include "xfs_inode.h"
#include "xfs_trans.h"
#include "xfs_bmap.h"
#include "xfs_attr_leaf.h"
@@ -2093,18 +2093,6 @@ xfs_da_compname(
XFS_CMP_EXACT : XFS_CMP_DIFFERENT;
}
-static xfs_dahash_t
-xfs_default_hashname(
- struct xfs_name *name)
-{
- return xfs_da_hashname(name->name, name->len);
-}
-
-const struct xfs_nameops xfs_default_nameops = {
- .hashname = xfs_default_hashname,
- .compname = xfs_da_compname
-};
-
int
xfs_da_grow_inode_int(
struct xfs_da_args *args,