diff options
author | Christoph Hellwig <hch@lst.de> | 2014-05-27 20:59:48 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-28 09:49:23 -0600 |
commit | a3bd77567cae6af700dcd245148befc73fc89a50 (patch) | |
tree | 465934c4f1fb0687da5d862e5221d54c0d34eb2f /block/blk-mq-tag.c | |
parent | 5dee857720db15e2c8ef0c03f7eeac00c4c63cb2 (diff) | |
download | linux-a3bd77567cae6af700dcd245148befc73fc89a50.tar.bz2 |
blk-mq: remove blk_mq_wait_for_tags
The current logic for blocking tag allocation is rather confusing, as we
first allocated and then free again a tag in blk_mq_wait_for_tags, just
to attempt a non-blocking allocation and then repeat if someone else
managed to grab the tag before us.
Instead change blk_mq_alloc_request_pinned to simply do a blocking tag
allocation itself and use the request we get back from it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r-- | block/blk-mq-tag.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 05e2baf4fa0d..0d0640d38a06 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -7,14 +7,6 @@ #include "blk-mq.h" #include "blk-mq-tag.h" -void blk_mq_wait_for_tags(struct blk_mq_hw_ctx *hctx, bool reserved) -{ - int tag, zero = 0; - - tag = blk_mq_get_tag(hctx, &zero, __GFP_WAIT, reserved); - blk_mq_put_tag(hctx, tag, &zero); -} - static bool bt_has_free_tags(struct blk_mq_bitmap_tags *bt) { int i; |