1 fs/mbcache: replace __builtin_log2() with ilog2()
3 From: T Makphaibulchoke <tmac@hp.com>
5 Fix compiler error with some gcc version(s) that do not
6 support __builtin_log2() by replacing __builtin_log2() with
9 Signed-off-by: T. Makphaibulchoke <tmac@hp.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>
14 1 file changed, 2 insertions(+), 1 deletion(-)
16 diff --git a/fs/mbcache.c b/fs/mbcache.c
17 index bf166e3..187477d 100644
21 #include <linux/mbcache.h>
22 #include <linux/init.h>
23 #include <linux/blockgroup_lock.h>
24 +#include <linux/log2.h>
27 # define mb_debug(f...) do { \
30 #define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
32 -#define MB_CACHE_ENTRY_LOCK_BITS __builtin_log2(NR_BG_LOCKS)
33 +#define MB_CACHE_ENTRY_LOCK_BITS ilog2(NR_BG_LOCKS)
34 #define MB_CACHE_ENTRY_LOCK_INDEX(ce) \
35 (hash_long((unsigned long)ce, MB_CACHE_ENTRY_LOCK_BITS))