summaryrefslogtreecommitdiff
path: root/ext2fs/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext2fs/bitmap.c')
-rw-r--r--ext2fs/bitmap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext2fs/bitmap.c b/ext2fs/bitmap.c
index ae3b2550..b46c6dca 100644
--- a/ext2fs/bitmap.c
+++ b/ext2fs/bitmap.c
@@ -7,9 +7,6 @@
* Universite Pierre et Marie Curie (Paris VI)
*/
-#include <linux/fs.h>
-#include <linux/ext2_fs.h>
-
static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
unsigned long ext2_count_free (char * map, unsigned int numchars)
@@ -20,7 +17,7 @@ unsigned long ext2_count_free (char * map, unsigned int numchars)
if (!map)
return (0);
for (i = 0; i < numchars; i++)
- sum += nibblemap[map->b_data[i] & 0xf] +
- nibblemap[(map->b_data[i] >> 4) & 0xf];
+ sum += nibblemap[map[i] & 0xf] +
+ nibblemap[(map[i] >> 4) & 0xf];
return (sum);
}