aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/bitmap.c')
-rw-r--r--fs/reiserfs/bitmap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index 483442e66ed..d1aca1df4f9 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -214,7 +214,7 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th,
214 } 214 }
215 /* otherwise we clear all bit were set ... */ 215 /* otherwise we clear all bit were set ... */
216 while (--i >= *beg) 216 while (--i >= *beg)
217 reiserfs_test_and_clear_le_bit 217 reiserfs_clear_le_bit
218 (i, bh->b_data); 218 (i, bh->b_data);
219 reiserfs_restore_prepared_buffer(s, bh); 219 reiserfs_restore_prepared_buffer(s, bh);
220 *beg = org; 220 *beg = org;
@@ -1222,15 +1222,11 @@ void reiserfs_cache_bitmap_metadata(struct super_block *sb,
1222 info->free_count = 0; 1222 info->free_count = 0;
1223 1223
1224 while (--cur >= (unsigned long *)bh->b_data) { 1224 while (--cur >= (unsigned long *)bh->b_data) {
1225 int i;
1226
1227 /* 0 and ~0 are special, we can optimize for them */ 1225 /* 0 and ~0 are special, we can optimize for them */
1228 if (*cur == 0) 1226 if (*cur == 0)
1229 info->free_count += BITS_PER_LONG; 1227 info->free_count += BITS_PER_LONG;
1230 else if (*cur != ~0L) /* A mix, investigate */ 1228 else if (*cur != ~0L) /* A mix, investigate */
1231 for (i = BITS_PER_LONG - 1; i >= 0; i--) 1229 info->free_count += BITS_PER_LONG - hweight_long(*cur);
1232 if (!reiserfs_test_le_bit(i, cur))
1233 info->free_count++;
1234 } 1230 }
1235} 1231}
1236 1232