Commit 9d1deb83 authored by Mike Snitzer's avatar Mike Snitzer

dm: don't schedule delayed run of the queue if nothing to do

In request-based DM's dm_request_fn(), if blk_peek_request() returns
NULL just return.  Avoids unnecessary blk_delay_queue().
Reported-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 9a0e609e
...@@ -1963,7 +1963,7 @@ static void dm_request_fn(struct request_queue *q) ...@@ -1963,7 +1963,7 @@ static void dm_request_fn(struct request_queue *q)
while (!blk_queue_stopped(q)) { while (!blk_queue_stopped(q)) {
rq = blk_peek_request(q); rq = blk_peek_request(q);
if (!rq) if (!rq)
goto delay_and_out; goto out;
/* always use block 0 to find the target for flushes for now */ /* always use block 0 to find the target for flushes for now */
pos = 0; pos = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment