diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-10-16 07:44:57 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-17 02:46:57 -0400 |
commit | 713ada9ba94f2ad874cffd074b83e3dc681ca82f (patch) | |
tree | e94cae4cb7d6d8bee404feb869bceee74b402f93 /block/blk-core.c | |
parent | 0997f1c5fec0b540784611036d458a84a1f7029a (diff) |
block: move q->unplug_work initialization
modprobe loop; rmmod loop effectively creates a blk_queue and destroys it
which results in q->unplug_work being canceled without it ever being
initialized.
Therefore, move the initialization of q->unplug_work from
blk_queue_make_request() to blk_alloc_queue*().
Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 8517264eb71e..fcbd56dd41fa 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -515,6 +515,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
515 | init_timer(&q->unplug_timer); | 515 | init_timer(&q->unplug_timer); |
516 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); | 516 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); |
517 | INIT_LIST_HEAD(&q->timeout_list); | 517 | INIT_LIST_HEAD(&q->timeout_list); |
518 | INIT_WORK(&q->unplug_work, blk_unplug_work); | ||
518 | 519 | ||
519 | kobject_init(&q->kobj, &blk_queue_ktype); | 520 | kobject_init(&q->kobj, &blk_queue_ktype); |
520 | 521 | ||