From 07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc Mon Sep 17 00:00:00 2001 From: Xiao Ni Date: Sat, 21 Jan 2023 09:48:10 +0800 Subject: [PATCH] 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. Signed-off-by: Xiao Ni Signed-off-by: Song Liu --- drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/md.c b/drivers/md/md.c index da63708..0cf3402 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6265,6 +6265,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.7.4