diff -urN linux-2.4.17-rc2-virgin/kernel/user.c linux-2.4.17-rc2-wli2/kernel/user.c --- linux-2.4.17-rc2-virgin/kernel/user.c Tue Dec 18 23:18:03 2001 +++ linux-2.4.17-rc2-wli2/kernel/user.c Tue Dec 18 22:28:42 2001 @@ -19,7 +19,14 @@ #define UIDHASH_BITS 8 #define UIDHASH_SZ (1 << UIDHASH_BITS) #define UIDHASH_MASK (UIDHASH_SZ - 1) -#define __uidhashfn(uid) (((uid >> UIDHASH_BITS) ^ uid) & UIDHASH_MASK) + +/* + * hash function borrowed from Chuck Lever's paper + * The effects of this replacement have not been measured. + * -- wli + */ +#define __uidhashfn(uid) \ + (((2654435761UL*(uid)) >> (BITS_PER_LONG-UIDHASH_BITS)) & UIDHASH_MASK) #define uidhashentry(uid) (uidhash_table + __uidhashfn(uid)) static kmem_cache_t *uid_cachep;