diff options
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r-- | block/ll_rw_blk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index a2e333ad0b64..82469db25100 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -908,17 +908,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth) | |||
908 | __FUNCTION__, depth); | 908 | __FUNCTION__, depth); |
909 | } | 909 | } |
910 | 910 | ||
911 | tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); | 911 | tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC); |
912 | if (!tag_index) | 912 | if (!tag_index) |
913 | goto fail; | 913 | goto fail; |
914 | 914 | ||
915 | nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; | 915 | nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; |
916 | tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); | 916 | tag_map = kzalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); |
917 | if (!tag_map) | 917 | if (!tag_map) |
918 | goto fail; | 918 | goto fail; |
919 | 919 | ||
920 | memset(tag_index, 0, depth * sizeof(struct request *)); | ||
921 | memset(tag_map, 0, nr_ulongs * sizeof(unsigned long)); | ||
922 | tags->real_max_depth = depth; | 920 | tags->real_max_depth = depth; |
923 | tags->max_depth = depth; | 921 | tags->max_depth = depth; |
924 | tags->tag_index = tag_index; | 922 | tags->tag_index = tag_index; |
@@ -2481,10 +2479,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk, | |||
2481 | rq->rq_disk = bd_disk; | 2479 | rq->rq_disk = bd_disk; |
2482 | rq->flags |= REQ_NOMERGE; | 2480 | rq->flags |= REQ_NOMERGE; |
2483 | rq->end_io = done; | 2481 | rq->end_io = done; |
2484 | elv_add_request(q, rq, where, 1); | 2482 | WARN_ON(irqs_disabled()); |
2485 | generic_unplug_device(q); | 2483 | spin_lock_irq(q->queue_lock); |
2484 | __elv_add_request(q, rq, where, 1); | ||
2485 | __generic_unplug_device(q); | ||
2486 | spin_unlock_irq(q->queue_lock); | ||
2486 | } | 2487 | } |
2487 | |||
2488 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); | 2488 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); |
2489 | 2489 | ||
2490 | /** | 2490 | /** |