aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 58f140bef999..2920fd004865 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -293,8 +293,8 @@ static void md_make_request(struct request_queue *q, struct bio *bio)
293/* mddev_suspend makes sure no new requests are submitted 293/* mddev_suspend makes sure no new requests are submitted
294 * to the device, and that any requests that have been submitted 294 * to the device, and that any requests that have been submitted
295 * are completely handled. 295 * are completely handled.
296 * Once ->stop is called and completes, the module will be completely 296 * Once mddev_detach() is called and completes, the module will be
297 * unused. 297 * completely unused.
298 */ 298 */
299void mddev_suspend(struct mddev *mddev) 299void mddev_suspend(struct mddev *mddev)
300{ 300{
@@ -3374,7 +3374,7 @@ level_store(struct mddev *mddev, const char *buf, size_t len)
3374 /* Looks like we have a winner */ 3374 /* Looks like we have a winner */
3375 mddev_suspend(mddev); 3375 mddev_suspend(mddev);
3376 mddev_detach(mddev); 3376 mddev_detach(mddev);
3377 mddev->pers->stop(mddev); 3377 mddev->pers->free(mddev, mddev->private);
3378 3378
3379 if (mddev->pers->sync_request == NULL && 3379 if (mddev->pers->sync_request == NULL &&
3380 pers->sync_request != NULL) { 3380 pers->sync_request != NULL) {
@@ -4940,7 +4940,7 @@ int md_run(struct mddev *mddev)
4940 } 4940 }
4941 if (err) { 4941 if (err) {
4942 mddev_detach(mddev); 4942 mddev_detach(mddev);
4943 mddev->pers->stop(mddev); 4943 mddev->pers->free(mddev, mddev->private);
4944 module_put(mddev->pers->owner); 4944 module_put(mddev->pers->owner);
4945 mddev->pers = NULL; 4945 mddev->pers = NULL;
4946 bitmap_destroy(mddev); 4946 bitmap_destroy(mddev);
@@ -5137,7 +5137,7 @@ static void __md_stop(struct mddev *mddev)
5137{ 5137{
5138 mddev->ready = 0; 5138 mddev->ready = 0;
5139 mddev_detach(mddev); 5139 mddev_detach(mddev);
5140 mddev->pers->stop(mddev); 5140 mddev->pers->free(mddev, mddev->private);
5141 if (mddev->pers->sync_request && mddev->to_remove == NULL) 5141 if (mddev->pers->sync_request && mddev->to_remove == NULL)
5142 mddev->to_remove = &md_redundancy_group; 5142 mddev->to_remove = &md_redundancy_group;
5143 module_put(mddev->pers->owner); 5143 module_put(mddev->pers->owner);