diff mbox series

Revert "md: fix a crash in mempool_free"

Message ID 20231222013624.1814544-1-uli@kernel.org (mailing list archive)
State New
Headers show
Series Revert "md: fix a crash in mempool_free" | expand

Commit Message

uli@kernel.org Dec. 22, 2023, 1:36 a.m. UTC
From: Ulrich Hecht <uli@kernel.org>

This reverts commit a8e2077ebc799a5fc55c369d4a4e41ba05534fb6, which is
commit cf06b162f5b6337b688072a1a47941280b8f7110 upstream.

The patch has been applied twice:

779785788a82f md: fix a crash in mempool_free
a8e2077ebc799 md: fix a crash in mempool_free

This reverts the second variant which has been mangled and causes a crash
when using raid1.

Reported-by: Alexander Hömig <ahoemig@datus.com>
Fixes: a8e2077ebc79 ("md: fix a crash in mempool_free")
Signed-off-by: Ulrich Hecht <uli@kernel.org>
---

Alexander, could you do us the favor of testing this again to make sure that
the removal of the rdev_dec_pending() call doesn't cause any issues? Thanks.

CU
Uli

 drivers/md/md.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 09e1b21460470..67bfdd95e9d4a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -736,10 +736,6 @@  static void super_written(struct bio *bio)
 
 	bio_put(bio);
 
-	bio_put(bio);
-
-	rdev_dec_pending(rdev, mddev);
-
 	if (atomic_dec_and_test(&mddev->pending_writes))
 		wake_up(&mddev->sb_wait);
 }