aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-04-06 00:23:02 -0400
committerNeilBrown <neilb@suse.de>2010-05-18 01:27:56 -0400
commit9e35b99c7efacfddc748c89a0c53b1122b0ee72c (patch)
tree5ef48fad2c5de4269cdacdb83a01e41e64683ae5 /drivers
parentfafd7fb052182e087b5a3c6c408e4ac8c2b5fa14 (diff)
md: don't unregister the thread in mddev_suspend
This is - unnecessary because mddev_suspend is always followed by a call to ->stop, and each ->stop unregisters the thread, and - a problem as it makes it awkwards to suspend and then resume a device as we will want later. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-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)