diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 1c264a701e70a300318b64309f285a71c515bdd5..97e73e555d112c8762b7934bd9892d39f5c6e4ce 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1785,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;