blk-mq: ensure mq_ops ->poll() is entered at least once
authorJens Axboe <axboe@kernel.dk>
Wed, 14 Nov 2018 04:32:10 +0000 (21:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2018 15:25:57 +0000 (08:25 -0700)
commitaa61bec30eca11816789dc25c2090366b0ccfaf8
tree90fd99996f94dfa0cae4ee03c2fe8fce3f3329ee
parent0a1b8b87d064a47fad9ec475316002da28559207
blk-mq: ensure mq_ops ->poll() is entered at least once

Right now we immediately bail if need_resched() is true, but
we need to do at least one loop in case we have entries waiting.
So just invert the need_resched() check, putting it at the
bottom of the loop.

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