linux-next: manual merge of the akpm tree with the ext4 tree

From: Stephen Rothwell
Date: Mon Jul 16 2012 - 02:53:00 EST


Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
fs/ext4/bitmap.c between commit f6fb99cadcd4 ("ext4: pass a char * to
ext4_count_free() instead of a buffer_head ptr") from the ext4 tree and
commit "ext4: use memweight()" from the akpm tree.

I fixed it up (I hope - see below) and can carry the fix as necessary.

N.B. this code is now used by more that just the EXT4FS_DEBUG code.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc fs/ext4/bitmap.c
index a94b9c6,ff53d5d..0000000
--- a/fs/ext4/bitmap.c
+++ b/fs/ext4/bitmap.c
@@@ -11,18 -11,15 +11,11 @@@
#include <linux/jbd2.h>
#include "ext4.h"

- static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
-
-#ifdef EXT4FS_DEBUG
-
-unsigned int ext4_count_free(struct buffer_head *map, unsigned int numchars)
+unsigned int ext4_count_free(char *bitmap, unsigned int numchars)
{
- unsigned int i, sum = 0;
-
- for (i = 0; i < numchars; i++)
- sum += nibblemap[bitmap[i] & 0xf] +
- nibblemap[(bitmap[i] >> 4) & 0xf];
- return sum;
- return numchars * BITS_PER_BYTE - memweight(map->b_data, numchars);
++ return numchars * BITS_PER_BYTE - memweight(bitmap, numchars);
}

-#endif /* EXT4FS_DEBUG */
-
int ext4_inode_bitmap_csum_verify(struct super_block *sb, ext4_group_t group,
struct ext4_group_desc *gdp,
struct buffer_head *bh, int sz)

Attachment: pgp00000.pgp
Description: PGP signature