aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_da_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/xfs_da_btree.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index c352d0633c31..6098aff7bd5c 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -1592,15 +1592,6 @@ xfs_da_hashname(const uchar_t *name, int namelen)
1592{ 1592{
1593 xfs_dahash_t hash; 1593 xfs_dahash_t hash;
1594 1594
1595#ifdef SLOWVERSION
1596 /*
1597 * This is the old one-byte-at-a-time version.
1598 */
1599 for (hash = 0; namelen > 0; namelen--)
1600 hash = *name++ ^ rol32(hash, 7);
1601
1602 return(hash);
1603#else
1604 /* 1595 /*
1605 * Do four characters at a time as long as we can. 1596 * Do four characters at a time as long as we can.
1606 */ 1597 */
@@ -1619,12 +1610,9 @@ xfs_da_hashname(const uchar_t *name, int namelen)
1619 return (name[0] << 7) ^ (name[1] << 0) ^ rol32(hash, 7 * 2); 1610 return (name[0] << 7) ^ (name[1] << 0) ^ rol32(hash, 7 * 2);
1620 case 1: 1611 case 1:
1621 return (name[0] << 0) ^ rol32(hash, 7 * 1); 1612 return (name[0] << 0) ^ rol32(hash, 7 * 1);
1622 case 0: 1613 default: /* case 0: */
1623 return hash; 1614 return hash;
1624 } 1615 }
1625 /* NOTREACHED */
1626#endif
1627 return 0; /* keep gcc happy */
1628} 1616}
1629 1617
1630/* 1618/*