From: Oleg Nesterov Date: Mon, 5 Nov 2007 07:58:05 +0000 (+0100) Subject: cfq: fix IOPRIO_CLASS_IDLE accounting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2389d1ef172fc9df01f58265a436919d233fbc27;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git cfq: fix IOPRIO_CLASS_IDLE accounting Spotted by Nick , hopefully can explain the second trace in http://bugzilla.kernel.org/show_bug.cgi?id=9180. If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times in a loop. Fix this. Signed-off-by: Oleg Nesterov Signed-off-by: Jens Axboe --- diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index e47a9309eb48..61a3f22eee29 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2068,9 +2068,10 @@ static void cfq_put_async_queues(struct cfq_data *cfqd) cfq_put_queue(cfqd->async_cfqq[0][i]); if (cfqd->async_cfqq[1][i]) cfq_put_queue(cfqd->async_cfqq[1][i]); - if (cfqd->async_idle_cfqq) - cfq_put_queue(cfqd->async_idle_cfqq); } + + if (cfqd->async_idle_cfqq) + cfq_put_queue(cfqd->async_idle_cfqq); } static void cfq_exit_queue(elevator_t *e)