Commit ec7756ae1517af483d995f386936d00a4cb1ab7d

Authored by T Makphaibulchoke
Committed by Theodore Ts'o
1 parent c5c7b8ddfb

fs/mbcache: replace __builtin_log2() with ilog2()

Fix compiler error with some gcc version(s) that do not
support __builtin_log2() by replacing __builtin_log2() with
ilog2().

Signed-off-by: T. Makphaibulchoke <tmac@hp.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -73,6 +73,7 @@
73 73 #include <linux/mbcache.h>
74 74 #include <linux/init.h>
75 75 #include <linux/blockgroup_lock.h>
  76 +#include <linux/log2.h>
76 77  
77 78 #ifdef MB_CACHE_DEBUG
78 79 # define mb_debug(f...) do { \
... ... @@ -93,7 +94,7 @@
93 94  
94 95 #define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
95 96  
96   -#define MB_CACHE_ENTRY_LOCK_BITS __builtin_log2(NR_BG_LOCKS)
  97 +#define MB_CACHE_ENTRY_LOCK_BITS ilog2(NR_BG_LOCKS)
97 98 #define MB_CACHE_ENTRY_LOCK_INDEX(ce) \
98 99 (hash_long((unsigned long)ce, MB_CACHE_ENTRY_LOCK_BITS))
99 100