# dm: When stoping dm-raid, it call dm\_md\_stop rather than md\_stop to do clear-up work

- From: majianpeng \<hidden\>
- Date: 2012-11-15 08:47:04 
- List: linux-raid
- Page: https://ratatoskr.run/linux-raid/2012/11/6622302
- Thread: https://ratatoskr.run/linux-raid/2012/11/6622302/t.md

```text
Because func md_stop can't clear up all resource about dm-raid.So Add a
func dm_md_stop to do it.

Signed-off-by: Jianpeng Ma <redacted>
---
 drivers/md/dm-raid.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 45d94a7..171cd71 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -1200,7 +1200,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
 	return 0;
 
 size_mismatch:
-	md_stop(&rs->md);
+	dm_md_stop(&rs->md);
 bad:
 	context_free(rs);
 
@@ -1212,7 +1212,7 @@ static void raid_dtr(struct dm_target *ti)
 	struct raid_set *rs = ti->private;
 
 	list_del_init(&rs->callbacks.list);
-	md_stop(&rs->md);
+	dm_md_stop(&rs->md);
 	context_free(rs);
 }
 
-- 
1.7.9.5
```
