# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.745 -> 1.746
# fs/reiserfs/super.c 1.20 -> 1.21
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/13
[email protected] 1.746
# Fix a problem where bitmap usage counters were possibly incorrectly updated on bigendian and 64 bit boxes.
# --------------------------------------------
#
diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c Tue Aug 13 19:38:31 2002
+++ b/fs/reiserfs/super.c Tue Aug 13 19:38:31 2002
@@ -721,7 +721,7 @@
static void load_bitmap_info_data (struct super_block *sb,
struct reiserfs_bitmap_info *bi)
{
- __u32 *cur = (__u32 *)bi->bh->b_data;
+ unsigned long *cur = (unsigned long *)bi->bh->b_data;
while ((char *)cur < (bi->bh->b_data + sb->s_blocksize)) {
@@ -731,11 +731,11 @@
if (bi->first_zero_hint == 0) {
bi->first_zero_hint = ((char *)cur - bi->bh->b_data) << 3;
}
- bi->free_count += 32;
+ bi->free_count += sizeof ( unsigned long ) * 8;
} else if (*cur != ~0L) {
int b;
- for (b = 0; b < 32; b++) {
- if (!test_bit (b, cur)) {
+ for (b = 0; b < sizeof ( unsigned long ) * 8; b++) {
+ if (!reiserfs_test_le_bit (b, cur)) {
bi->free_count ++;
if (bi->first_zero_hint == 0)
bi->first_zero_hint =