Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec7756ae authored by T Makphaibulchoke's avatar T Makphaibulchoke Committed by Theodore Ts'o
Browse files

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: default avatarT. Makphaibulchoke <tmac@hp.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
parent c5c7b8dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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))