]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cfq: fix IOPRIO_CLASS_IDLE accounting
authorOleg Nesterov <oleg@tv-sign.ru>
Mon, 5 Nov 2007 07:58:05 +0000 (08:58 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 7 Nov 2007 08:45:00 +0000 (09:45 +0100)
Spotted by Nick <gentuu@gmail.com>, 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 <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/cfq-iosched.c

index e47a9309eb485058b72d4649f631cf0029ee3dcb..61a3f22eee2990a4b833dd264ce41c01db7bf6b4 100644 (file)
@@ -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)