X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fext3%2Fbitmap.c;h=ef9c643e8e9d5ff75703227ec9f81f0684340246;hb=e97a72ece87ace539de7da25fa5d3327e728042b;hp=909d13e265603dd24e3e1c2d143e87f7beda4202;hpb=94fb175c0414902ad9dbd956addf3a5feafbc85b;p=karo-tx-linux.git diff --git a/fs/ext3/bitmap.c b/fs/ext3/bitmap.c index 909d13e26560..ef9c643e8e9d 100644 --- a/fs/ext3/bitmap.c +++ b/fs/ext3/bitmap.c @@ -11,19 +11,9 @@ #ifdef EXT3FS_DEBUG -static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; - unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { - unsigned int i; - unsigned long sum = 0; - - if (!map) - return (0); - for (i = 0; i < numchars; i++) - sum += nibblemap[map->b_data[i] & 0xf] + - nibblemap[(map->b_data[i] >> 4) & 0xf]; - return (sum); + return numchars * BITS_PER_BYTE - memweight(map->b_data, numchars); } #endif /* EXT3FS_DEBUG */