summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown2010-04-06 06:23:02 +0200
committerNeilBrown2010-05-18 07:27:56 +0200
commit9e35b99c7efacfddc748c89a0c53b1122b0ee72c (patch)
tree5ef48fad2c5de4269cdacdb83a01e41e64683ae5 /drivers/md/md.c
parentmd: factor out init code for an mddev (diff)
downloadkernel-qcow2-linux-9e35b99c7efacfddc748c89a0c53b1122b0ee72c.tar.gz
kernel-qcow2-linux-9e35b99c7efacfddc748c89a0c53b1122b0ee72c.tar.xz
kernel-qcow2-linux-9e35b99c7efacfddc748c89a0c53b1122b0ee72c.zip
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/md/md.c')
-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)
return rv;
}
+/* 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.
+ */
static void mddev_suspend(mddev_t *mddev)
{
BUG_ON(mddev->suspended);
@@ -261,13 +267,6 @@ static void mddev_suspend(mddev_t *mddev)
synchronize_rcu();
wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0);
mddev->pers->quiesce(mddev, 1);
- md_unregister_thread(mddev->thread);
- mddev->thread = NULL;
- /* we now know that no code is executing in the personality module,
- * except possibly the tail end of a ->bi_end_io function, but that
- * is certain to complete before the module has a chance to get
- * unloaded
- */
}
static void mddev_resume(mddev_t *mddev)