Revert "md-raid: destroy the bitmap after destroying the thread"
commit1d258758cfupstream. This reverts commite151db8ecf. Because it obviously breaks clustered raid as noticed by Neil though it fixed KASAN issue for dm-raid, let's revert it and fix KASAN issue in next commit. [1]. https://lore.kernel.org/linux-raid/a6657e08-b6a7-358b-2d2a-0ac37d49d23a@linux.dev/T/#m95ac225cab7409f66c295772483d091084a6d470 Fixes:e151db8ecf("md-raid: destroy the bitmap after destroying the thread") Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
62af37c5cd
commit
f68f025c7e
+1
-1
@@ -6278,11 +6278,11 @@ static void mddev_detach(struct mddev *mddev)
|
|||||||
static void __md_stop(struct mddev *mddev)
|
static void __md_stop(struct mddev *mddev)
|
||||||
{
|
{
|
||||||
struct md_personality *pers = mddev->pers;
|
struct md_personality *pers = mddev->pers;
|
||||||
|
md_bitmap_destroy(mddev);
|
||||||
mddev_detach(mddev);
|
mddev_detach(mddev);
|
||||||
/* Ensure ->event_work is done */
|
/* Ensure ->event_work is done */
|
||||||
if (mddev->event_work.func)
|
if (mddev->event_work.func)
|
||||||
flush_workqueue(md_misc_wq);
|
flush_workqueue(md_misc_wq);
|
||||||
md_bitmap_destroy(mddev);
|
|
||||||
spin_lock(&mddev->lock);
|
spin_lock(&mddev->lock);
|
||||||
mddev->pers = NULL;
|
mddev->pers = NULL;
|
||||||
spin_unlock(&mddev->lock);
|
spin_unlock(&mddev->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user