linux-next: manual merge of the kmap_atomic tree with the md tree

From: Stephen Rothwell
Date: Thu Mar 15 2012 - 02:10:11 EST


Hi Cong,

Today's linux-next merge of the kmap_atomic tree got a conflict in
drivers/md/bitmap.c between commit 83a191d7b09d ("md/bitmap: remove some
pointless locking") from the md tree and commit 63716d51774d ("md: remove
the second argument of k[un]map_atomic()") from the kmap_atomic tree.

Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/md/bitmap.c
index cf5863c,045e086..0000000
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@@ -426,9 -451,13 +426,9 @@@ void bitmap_update_sb(struct bitmap *bi
return;
if (bitmap->mddev->bitmap_info.external)
return;
- spin_lock_irqsave(&bitmap->lock, flags);
- if (!bitmap->sb_page) { /* no superblock */
- spin_unlock_irqrestore(&bitmap->lock, flags);
+ if (!bitmap->sb_page) /* no superblock */
return;
- sb = kmap_atomic(bitmap->sb_page, KM_USER0);
- }
- spin_unlock_irqrestore(&bitmap->lock, flags);
+ sb = kmap_atomic(bitmap->sb_page);
sb->events = cpu_to_le64(bitmap->mddev->events);
if (bitmap->mddev->events < bitmap->events_cleared)
/* rocking back to read-only */
@@@ -653,11 -680,16 +653,11 @@@ static int bitmap_mask_state(struct bit
enum bitmap_mask_op op)
{
bitmap_super_t *sb;
- unsigned long flags;
int old;

- spin_lock_irqsave(&bitmap->lock, flags);
- if (!bitmap->sb_page) { /* can't set the state */
- spin_unlock_irqrestore(&bitmap->lock, flags);
+ if (!bitmap->sb_page) /* can't set the state */
return 0;
- sb = kmap_atomic(bitmap->sb_page, KM_USER0);
- }
- spin_unlock_irqrestore(&bitmap->lock, flags);
+ sb = kmap_atomic(bitmap->sb_page);
old = le32_to_cpu(sb->state) & bits;
switch (op) {
case MASK_SET:
@@@ -1034,13 -1066,13 +1034,13 @@@ static int bitmap_init_from_disk(struc
b = test_bit(bit, paddr);
else
b = test_bit_le(bit, paddr);
- kunmap_atomic(paddr, KM_USER0);
+ kunmap_atomic(paddr);
if (b) {
/* if the disk bit is set, set the memory bit */
- int needed = ((sector_t)(i+1) << (CHUNK_BLOCK_SHIFT(bitmap))
+ int needed = ((sector_t)(i+1) << bitmap->chunkshift
>= start);
bitmap_set_memory_bits(bitmap,
- (sector_t)i << CHUNK_BLOCK_SHIFT(bitmap),
+ (sector_t)i << bitmap->chunkshift,
needed);
bit_cnt++;
}

Attachment: pgp00000.pgp
Description: PGP signature