aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGravatar Xiao Ni <xni@redhat.com> 2023-01-21 09:48:10 +0800
committerGravatar Song Liu <song@kernel.org> 2023-02-01 08:32:58 -0800
commit07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc (patch)
tree74ac3e56323f242393264abd1d5b937a144ac4cf /drivers/md/md.c
parentmd: Change active_io to percpu (diff)
downloadlinux-07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc.tar.gz
linux-07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc.tar.bz2
linux-07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc.zip
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/md.c')
-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);