From: Mike Snitzer Date: Wed, 25 Feb 2015 01:49:18 +0000 (-0500) Subject: dm: don't schedule delayed run of the queue if nothing to do X-Git-Tag: firefly_0821_release~176^2~1939^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9d1deb83d489364f8749a3a1ba1689efb07d94b0;p=firefly-linux-kernel-4.4.55.git 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: Jens Axboe Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 7924c00e0716..6f854287384b 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -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;