aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d3579fc9efed..af0780ae56b5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -254,6 +254,12 @@ static int md_make_request(struct request_queue *q, struct bio *bio)
254 return rv; 254 return rv;
255} 255}
256 256
257/* mddev_suspend makes sure no new requests are submitted
258 * to the device, and that any requests that have been submitted
259 * are completely handled.
260 * Once ->stop is called and completes, the module will be completely
261 * unused.
262 */
257static void mddev_suspend(mddev_t *mddev) 263static void mddev_suspend(mddev_t *mddev)
258{ 264{
259 BUG_ON(mddev->suspended); 265 BUG_ON(mddev->suspended);
@@ -261,13 +267,6 @@ static void mddev_suspend(mddev_t *mddev)
261 synchronize_rcu(); 267 synchronize_rcu();
262 wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0); 268 wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0);
263 mddev->pers->quiesce(mddev, 1); 269 mddev->pers->quiesce(mddev, 1);
264 md_unregister_thread(mddev->thread);
265 mddev->thread = NULL;
266 /* we now know that no code is executing in the personality module,
267 * except possibly the tail end of a ->bi_end_io function, but that
268 * is certain to complete before the module has a chance to get
269 * unloaded
270 */
271} 270}
272 271
273static void mddev_resume(mddev_t *mddev) 272static void mddev_resume(mddev_t *mddev)