Skip to contentSkip to conversation

md: Free writes_pending in md_stop

PATCH Applied Xiao Ni 2 participants 2 messages Jan 21, 2023 – Feb 1, 2023 MD RAID

lore
Share & tools
lore

Xiao Ni

author
#0 lore raw

PATCH 1/1 md: Free writes_pending in md_stop

dm raid calls md_stop to stop the raid device. It needs to free the writes_pending here.

---
 drivers/md/md.c | 1 +
 1 file changed, 1 insertion(+)
drivers/md/md.c +1 -0
index 100c1327e90b..0e9f870e348a 100644
@@ -6267,6 +6267,7 @@ void md_stop(struct mddev *mddev)
 	 */
 	__md_stop_writes(mddev);
 	__md_stop(mddev);
+	percpu_ref_exit(&mddev->writes_pending);
 	percpu_ref_exit(&mddev->active_io);
 	bioset_exit(&mddev->bio_set);
 	bioset_exit(&mddev->sync_set);
Signature · 1 line
2.32.0 (Apple Git-132)
maintainer Applied
#1 lore raw
Quoted 5 lines · Xiao Ni

dm raid calls md_stop to stop the raid device. It needs to free the writes_pending here.

Applied to md-next.

Thanks,
Song

Quoted 19 lines
---
 drivers/md/md.c | 1 +
 1 file changed, 1 insertion(+)
drivers/md/md.c +1 -1
index 100c1327e90b..0e9f870e348a 100644
@@ -6267,6 +6267,7 @@ void md_stop(struct mddev *mddev)
         */
        __md_stop_writes(mddev);
        __md_stop(mddev);
+       percpu_ref_exit(&mddev->writes_pending);
        percpu_ref_exit(&mddev->active_io);
        bioset_exit(&mddev->bio_set);
        bioset_exit(&mddev->sync_set);
--

2.32.0 (Apple Git-132)