From cbe6772bd46ce5ef4655458498f2e63f609f16a2 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 25 Jul 2011 17:13:38 -0700 Subject: [PATCH] --- yaml --- r: 259037 b: refs/heads/master c: 9d6bf5aa177ee7ffdcee2a590ef8a1bf9e8ade87 h: refs/heads/master i: 259035: ed88c5b3bca0528a6f12be440f0864e51099e5ed v: v3 --- [refs] | 2 +- trunk/fs/reiserfs/bitmap.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c901da22821c..5ed9cf67f7af 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c2fd1bfb155947a821fdaeb3c46aa1cfa20ad64 +refs/heads/master: 9d6bf5aa177ee7ffdcee2a590ef8a1bf9e8ade87 diff --git a/trunk/fs/reiserfs/bitmap.c b/trunk/fs/reiserfs/bitmap.c index 567385aa7813..d1aca1df4f92 100644 --- a/trunk/fs/reiserfs/bitmap.c +++ b/trunk/fs/reiserfs/bitmap.c @@ -1222,15 +1222,11 @@ void reiserfs_cache_bitmap_metadata(struct super_block *sb, info->free_count = 0; while (--cur >= (unsigned long *)bh->b_data) { - int i; - /* 0 and ~0 are special, we can optimize for them */ if (*cur == 0) info->free_count += BITS_PER_LONG; else if (*cur != ~0L) /* A mix, investigate */ - for (i = BITS_PER_LONG - 1; i >= 0; i--) - if (!reiserfs_test_le_bit(i, cur)) - info->free_count++; + info->free_count += BITS_PER_LONG - hweight_long(*cur); } }