diff options
author | NeilBrown <neilb@suse.de> | 2014-12-15 04:56:58 +0300 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-04 00:35:52 +0300 |
commit | afa0f557cb15176570a18fb2a093e348a793afd4 (patch) | |
tree | 7ae3f6a37ae3e6bcfbea51faadad924df8020095 /drivers/md/md.c | |
parent | 5aa61f427e4979be733e4847b9199ff9cc48a47e (diff) | |
download | linux-afa0f557cb15176570a18fb2a093e348a793afd4.tar.xz |
md: rename ->stop to ->free
Now that the ->stop function only frees the private data,
rename is accordingly.
Also pass in the private pointer as an arg rather than using
mddev->private. This flexibility will be useful in level_store().
Finally, don't clear ->private. It doesn't make sense to clear
it seeing that isn't what we free, and it is no longer necessary
to clear ->private (it was some time ago before ->to_remove was
introduced).
Setting ->to_remove in ->free() is a bit of a wart, but not a
big problem at the moment.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 10 |
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) /* mddev_suspend makes sure no new requests are submitted * to the device, and that any requests that have been submitted * are completely handled. - * Once ->stop is called and completes, the module will be completely - * unused. + * Once mddev_detach() is called and completes, the module will be + * completely unused. */ void mddev_suspend(struct mddev *mddev) { @@ -3374,7 +3374,7 @@ level_store(struct mddev *mddev, const char *buf, size_t len) /* Looks like we have a winner */ mddev_suspend(mddev); mddev_detach(mddev); - mddev->pers->stop(mddev); + mddev->pers->free(mddev, mddev->private); if (mddev->pers->sync_request == NULL && pers->sync_request != NULL) { @@ -4940,7 +4940,7 @@ int md_run(struct mddev *mddev) } if (err) { mddev_detach(mddev); - mddev->pers->stop(mddev); + mddev->pers->free(mddev, mddev->private); module_put(mddev->pers->owner); mddev->pers = NULL; bitmap_destroy(mddev); @@ -5137,7 +5137,7 @@ static void __md_stop(struct mddev *mddev) { mddev->ready = 0; mddev_detach(mddev); - mddev->pers->stop(mddev); + mddev->pers->free(mddev, mddev->private); if (mddev->pers->sync_request && mddev->to_remove == NULL) mddev->to_remove = &md_redundancy_group; module_put(mddev->pers->owner); |