diff options
| -rw-r--r-- | block/blk-tag.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-tag.c b/block/blk-tag.c index 32667beb03ee..ed5166fbc599 100644 --- a/block/blk-tag.c +++ b/block/blk-tag.c | |||
| @@ -38,7 +38,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt) | |||
| 38 | 38 | ||
| 39 | retval = atomic_dec_and_test(&bqt->refcnt); | 39 | retval = atomic_dec_and_test(&bqt->refcnt); |
| 40 | if (retval) { | 40 | if (retval) { |
| 41 | BUG_ON(bqt->busy); | 41 | BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) < |
| 42 | bqt->max_depth); | ||
| 42 | 43 | ||
| 43 | kfree(bqt->tag_index); | 44 | kfree(bqt->tag_index); |
| 44 | bqt->tag_index = NULL; | 45 | bqt->tag_index = NULL; |
| @@ -147,7 +148,6 @@ static struct blk_queue_tag *__blk_queue_init_tags(struct request_queue *q, | |||
| 147 | if (init_tag_map(q, tags, depth)) | 148 | if (init_tag_map(q, tags, depth)) |
| 148 | goto fail; | 149 | goto fail; |
| 149 | 150 | ||
| 150 | tags->busy = 0; | ||
| 151 | atomic_set(&tags->refcnt, 1); | 151 | atomic_set(&tags->refcnt, 1); |
| 152 | return tags; | 152 | return tags; |
| 153 | fail: | 153 | fail: |
| @@ -313,7 +313,6 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq) | |||
| 313 | * unlock memory barrier semantics. | 313 | * unlock memory barrier semantics. |
| 314 | */ | 314 | */ |
| 315 | clear_bit_unlock(tag, bqt->tag_map); | 315 | clear_bit_unlock(tag, bqt->tag_map); |
| 316 | bqt->busy--; | ||
| 317 | } | 316 | } |
| 318 | EXPORT_SYMBOL(blk_queue_end_tag); | 317 | EXPORT_SYMBOL(blk_queue_end_tag); |
| 319 | 318 | ||
| @@ -368,7 +367,6 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq) | |||
| 368 | bqt->tag_index[tag] = rq; | 367 | bqt->tag_index[tag] = rq; |
| 369 | blkdev_dequeue_request(rq); | 368 | blkdev_dequeue_request(rq); |
| 370 | list_add(&rq->queuelist, &q->tag_busy_list); | 369 | list_add(&rq->queuelist, &q->tag_busy_list); |
| 371 | bqt->busy++; | ||
| 372 | return 0; | 370 | return 0; |
| 373 | } | 371 | } |
| 374 | EXPORT_SYMBOL(blk_queue_start_tag); | 372 | EXPORT_SYMBOL(blk_queue_start_tag); |
