aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2014-12-09 10:59:48 -0500
committerJens Axboe <axboe@fb.com>2014-12-09 11:07:28 -0500
commit52f7eb945f2ba62b324bb9ae16d945326a961dcf (patch)
tree000158231baaf25480bc9adb50ba8dd7e37e646c /block
parentc38d185d4af12e8be63ca4b6745d99449c450f12 (diff)
blk-mq: Micro-optimize bt_get()
Remove a superfluous finish_wait() call. Convert the two bt_wait_ptr() calls into a single call. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Robert Elliott <elliott@hp.com> Cc: Ming Lei <ming.lei@canonical.com> Cc: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq-tag.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index e47c4c75fd33..1b7229f9354a 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -248,8 +248,8 @@ static int bt_get(struct blk_mq_alloc_data *data,
248 if (!(data->gfp & __GFP_WAIT)) 248 if (!(data->gfp & __GFP_WAIT))
249 return -1; 249 return -1;
250 250
251 bs = bt_wait_ptr(bt, hctx);
252 do { 251 do {
252 bs = bt_wait_ptr(bt, hctx);
253 prepare_to_wait(&bs->wait, &wait, TASK_UNINTERRUPTIBLE); 253 prepare_to_wait(&bs->wait, &wait, TASK_UNINTERRUPTIBLE);
254 254
255 tag = __bt_get(hctx, bt, last_tag); 255 tag = __bt_get(hctx, bt, last_tag);
@@ -285,8 +285,6 @@ static int bt_get(struct blk_mq_alloc_data *data,
285 hctx = data->hctx; 285 hctx = data->hctx;
286 bt = &hctx->tags->bitmap_tags; 286 bt = &hctx->tags->bitmap_tags;
287 } 287 }
288 finish_wait(&bs->wait, &wait);
289 bs = bt_wait_ptr(bt, hctx);
290 } while (1); 288 } while (1);
291 289
292 finish_wait(&bs->wait, &wait); 290 finish_wait(&bs->wait, &wait);