Skip to content

Commit

Permalink
dm: don't schedule delayed run of the queue if nothing to do
Browse files Browse the repository at this point in the history
In request-based DM's dm_request_fn(), if blk_peek_request() returns
NULL just return.  Avoids unnecessary blk_delay_queue().

Reported-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mike Snitzer committed Apr 15, 2015
1 parent 9a0e609 commit 9d1deb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,7 @@ static void dm_request_fn(struct request_queue *q)
while (!blk_queue_stopped(q)) {
rq = blk_peek_request(q);
if (!rq)
goto delay_and_out;
goto out;

/* always use block 0 to find the target for flushes for now */
pos = 0;
Expand Down

0 comments on commit 9d1deb8

Please sign in to comment.