diff options
author | T Makphaibulchoke <tmac@hp.com> | 2014-06-26 04:08:29 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-06-26 04:08:29 +0200 |
commit | ec7756ae1517af483d995f386936d00a4cb1ab7d (patch) | |
tree | 4a8869a07712281563683312eb0b3346b43e90c8 /fs | |
parent | ext4: Fix buffer double free in ext4_alloc_branch() (diff) | |
download | linux-ec7756ae1517af483d995f386936d00a4cb1ab7d.tar.xz linux-ec7756ae1517af483d995f386936d00a4cb1ab7d.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/mbcache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/mbcache.c b/fs/mbcache.c index bf166e388f0d..187477ded6b3 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -73,6 +73,7 @@ #include <linux/mbcache.h> #include <linux/init.h> #include <linux/blockgroup_lock.h> +#include <linux/log2.h> #ifdef MB_CACHE_DEBUG # define mb_debug(f...) do { \ @@ -93,7 +94,7 @@ #define MB_CACHE_WRITER ((unsigned short)~0U >> 1) -#define MB_CACHE_ENTRY_LOCK_BITS __builtin_log2(NR_BG_LOCKS) +#define MB_CACHE_ENTRY_LOCK_BITS ilog2(NR_BG_LOCKS) #define MB_CACHE_ENTRY_LOCK_INDEX(ce) \ (hash_long((unsigned long)ce, MB_CACHE_ENTRY_LOCK_BITS)) |