]> git.baikalelectronics.ru Git - kernel.git/commit
block: optimise req_bio_endio()
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 19 Oct 2021 21:24:12 +0000 (22:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Oct 2021 14:08:05 +0000 (08:08 -0600)
commit5fe6178f14c29ae61198a01e1ba2c4c3f3fcd30e
treedc81054f6f79d225ae7afcbab10996ca42b3cc09
parente8be593938e44f323012d9f4e5965334ce74bf4a
block: optimise req_bio_endio()

First, get rid of an extra branch and chain error checks. Also reshuffle
it with bio_advance(), so it goes closer to the final check, with that
the compiler loads rq->rq_flags only once, and also doesn't reload
bio->bi_iter.bi_size if bio_advance() didn't actually advanced the iter.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c