Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=21846 add a test for testing rehash in sanity.sh
[fs/lustre-release.git]
/
libcfs
/
include
/
libcfs
/
user-bitops.h
diff --git
a/libcfs/include/libcfs/user-bitops.h
b/libcfs/include/libcfs/user-bitops.h
index
97eeaf9
..
4ce7bdf
100644
(file)
--- a/
libcfs/include/libcfs/user-bitops.h
+++ b/
libcfs/include/libcfs/user-bitops.h
@@
-84,11
+84,11
@@
static __inline__ unsigned long __cfs_fls(long data)
return 0;
#if BITS_PER_LONG == 64
return 0;
#if BITS_PER_LONG == 64
- pos += 32;
-
- if ((data & 0xFFFFFFFF
) == 0
) {
- data
<<
= 32;
- pos
-
= 32;
+ /* If any bit of the high 32 bits are set, shift the high
+ * 32 bits down and pretend like it is a 32-bit value. */
+ if ((data & 0xFFFFFFFF
00000000llu)
) {
+ data
>>
= 32;
+ pos
+
= 32;
}
#endif
}
#endif