--- 25-akpm/mm/page_alloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff -puN mm/page_alloc.c~permit-inode-dentry-hash-tables-to-be-allocated-max_order-size-warning-fix mm/page_alloc.c --- 25/mm/page_alloc.c~permit-inode-dentry-hash-tables-to-be-allocated-max_order-size-warning-fix 2004-06-13 23:33:06.868734952 -0700 +++ 25-akpm/mm/page_alloc.c 2004-06-13 23:36:22.979921520 -0700 @@ -1983,8 +1983,8 @@ int lower_zone_protection_sysctl_handler * - it is assumed that the hash table must contain an exact power-of-2 * quantity of entries */ -static inline int log2(unsigned long x) __attribute__((pure)); -static inline int log2(unsigned long x) +static inline int calc_log2(unsigned long x) __attribute_pure__; +static inline int calc_log2(unsigned long x) { int r = 0; for (x >>= 1; x > 0; x >>= 1) @@ -2016,7 +2016,7 @@ void *__init alloc_large_system_hash(con else mem <<= (PAGE_SHIFT - scale); - mem = 1UL << (log2(mem) + 1); + mem = 1UL << (calc_log2(mem) + 1); /* limit allocation size */ max = (1UL << (PAGE_SHIFT + MAX_SYS_HASH_TABLE_ORDER)) / bucketsize; @@ -2027,7 +2027,7 @@ void *__init alloc_large_system_hash(con if (!numentries || numentries > max) numentries = max; - log2qty = log2(numentries); + log2qty = calc_log2(numentries); do { size = bucketsize << log2qty; @@ -2042,7 +2042,7 @@ void *__init alloc_large_system_hash(con printk("%s hash table entries: %d (order: %d, %lu bytes)\n", tablename, (1U << log2qty), - log2(size) - PAGE_SHIFT, + calc_log2(size) - PAGE_SHIFT, size); if (_hash_shift) _