diff options
author | Valerie Henson <val_henson@linux.intel.com> | 2006-06-25 08:48:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:12 -0400 |
commit | 21730eed11de42f22afcbd43f450a1872a0b5ea1 (patch) | |
tree | f695865bce3b87bbc9e1f0a8e61eaeecf8442b06 /fs/ext2/bitmap.c | |
parent | 42225a359aa8094242651191ad0ac9c338503d81 (diff) |
[PATCH] Make EXT2_DEBUG work again
This patch makes EXT2_DEBUG work again. Due to lack of proper include
file, EXT2_DEBUG was undefined in bitmap.c and ext2_count_free() is left
out. Moved to balloc.c and removed bitmap.c entirely.
Second, debug versions of ext2_count_free_{inodes/blocks} reacquires
superblock lock. Moved lock into callers.
Signed-off-by: Val Henson <val_henson@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext2/bitmap.c')
-rw-r--r-- | fs/ext2/bitmap.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/fs/ext2/bitmap.c b/fs/ext2/bitmap.c deleted file mode 100644 index e9983a0dd396..000000000000 --- a/fs/ext2/bitmap.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * linux/fs/ext2/bitmap.c | ||
3 | * | ||
4 | * Copyright (C) 1992, 1993, 1994, 1995 | ||
5 | * Remy Card (card@masi.ibp.fr) | ||
6 | * Laboratoire MASI - Institut Blaise Pascal | ||
7 | * Universite Pierre et Marie Curie (Paris VI) | ||
8 | */ | ||
9 | |||
10 | #ifdef EXT2FS_DEBUG | ||
11 | |||
12 | #include <linux/buffer_head.h> | ||
13 | |||
14 | #include "ext2.h" | ||
15 | |||
16 | static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; | ||
17 | |||
18 | unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) | ||
19 | { | ||
20 | unsigned int i; | ||
21 | unsigned long sum = 0; | ||
22 | |||
23 | if (!map) | ||
24 | return (0); | ||
25 | for (i = 0; i < numchars; i++) | ||
26 | sum += nibblemap[map->b_data[i] & 0xf] + | ||
27 | nibblemap[(map->b_data[i] >> 4) & 0xf]; | ||
28 | return (sum); | ||
29 | } | ||
30 | |||
31 | #endif /* EXT2FS_DEBUG */ | ||
32 | |||