summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2023-01-21 04:48:10 +0300
committerSong Liu <song@kernel.org>2023-02-01 19:32:58 +0300
commit07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc (patch)
tree74ac3e56323f242393264abd1d5b937a144ac4cf /drivers/md
parent72adae23a72cb12e2ef0dcd7c0aa042867f27998 (diff)
downloadlinux-07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc.tar.xz
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 <xni@redhat.com> Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index da6370835c47..0cf340243ddb 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);