diff options
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 7878712721bf..b6907118283a 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1106,10 +1106,12 @@ void bitmap_write_all(struct bitmap *bitmap) | |||
1106 | */ | 1106 | */ |
1107 | int i; | 1107 | int i; |
1108 | 1108 | ||
1109 | spin_lock_irq(&bitmap->lock); | ||
1109 | for (i = 0; i < bitmap->file_pages; i++) | 1110 | for (i = 0; i < bitmap->file_pages; i++) |
1110 | set_page_attr(bitmap, bitmap->filemap[i], | 1111 | set_page_attr(bitmap, bitmap->filemap[i], |
1111 | BITMAP_PAGE_NEEDWRITE); | 1112 | BITMAP_PAGE_NEEDWRITE); |
1112 | bitmap->allclean = 0; | 1113 | bitmap->allclean = 0; |
1114 | spin_unlock_irq(&bitmap->lock); | ||
1113 | } | 1115 | } |
1114 | 1116 | ||
1115 | static void bitmap_count_page(struct bitmap *bitmap, sector_t offset, int inc) | 1117 | static void bitmap_count_page(struct bitmap *bitmap, sector_t offset, int inc) |
@@ -1605,7 +1607,9 @@ void bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e) | |||
1605 | for (chunk = s; chunk <= e; chunk++) { | 1607 | for (chunk = s; chunk <= e; chunk++) { |
1606 | sector_t sec = (sector_t)chunk << CHUNK_BLOCK_SHIFT(bitmap); | 1608 | sector_t sec = (sector_t)chunk << CHUNK_BLOCK_SHIFT(bitmap); |
1607 | bitmap_set_memory_bits(bitmap, sec, 1); | 1609 | bitmap_set_memory_bits(bitmap, sec, 1); |
1610 | spin_lock_irq(&bitmap->lock); | ||
1608 | bitmap_file_set_bit(bitmap, sec); | 1611 | bitmap_file_set_bit(bitmap, sec); |
1612 | spin_unlock_irq(&bitmap->lock); | ||
1609 | if (sec < bitmap->mddev->recovery_cp) | 1613 | if (sec < bitmap->mddev->recovery_cp) |
1610 | /* We are asserting that the array is dirty, | 1614 | /* We are asserting that the array is dirty, |
1611 | * so move the recovery_cp address back so | 1615 | * so move the recovery_cp address back so |