summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-12 13:12:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-12 13:12:56 -0700
commite42bd6e4a666709fc3a56cf4577c1f6fdb1c193f (patch)
treee2596e735f3f0373072ffc9ce8cd5ae246b6d84c /drivers/md/bitmap.c
parent7e066489726b52bea419085e5b8929e1e89f57a8 (diff)
parentafbaa90b80b1ec66e5137cc3824746bfdf559b18 (diff)
downloadlinux-e42bd6e4a666709fc3a56cf4577c1f6fdb1c193f.tar.bz2
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull a few more fixes for md from NeilBrown: "Two are tagged for -stable. They can cause an oops, but very rarely." * tag 'md-3.4-fixes' of git://neil.brown.name/md: md/bitmap: prevent bitmap_daemon_work running while initialising bitmap md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery. MD: Bitmap version cleanup.
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 3d0dfa7a89a2..97e73e555d11 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -539,9 +539,6 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)
bitmap->events_cleared = bitmap->mddev->events;
sb->events_cleared = cpu_to_le64(bitmap->mddev->events);
- bitmap->flags |= BITMAP_HOSTENDIAN;
- sb->version = cpu_to_le32(BITMAP_MAJOR_HOSTENDIAN);
-
kunmap_atomic(sb);
return 0;
@@ -1788,7 +1785,9 @@ int bitmap_load(struct mddev *mddev)
* re-add of a missing device */
start = mddev->recovery_cp;
+ mutex_lock(&mddev->bitmap_info.mutex);
err = bitmap_init_from_disk(bitmap, start);
+ mutex_unlock(&mddev->bitmap_info.mutex);
if (err)
goto out;