bfq-iosched: don't call bfqg_and_blkg_put for !CONFIG_BFQ_GROUP_IOSCHED
authorJens Axboe <axboe@kernel.dk>
Tue, 9 Jan 2018 19:20:51 +0000 (12:20 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Jan 2018 19:22:28 +0000 (12:22 -0700)
It's not available if we don't have group io scheduling set, and
there's no need to call it.

Fixes: 0d52af590552 ("block, bfq: release oom-queue ref to root group on exit")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c

index 7c0b7f6..5e6f837 100644 (file)
@@ -4893,10 +4893,10 @@ static void bfq_exit_queue(struct elevator_queue *e)
 
        hrtimer_cancel(&bfqd->idle_slice_timer);
 
+#ifdef CONFIG_BFQ_GROUP_IOSCHED
        /* release oom-queue reference to root group */
        bfqg_and_blkg_put(bfqd->root_group);
 
-#ifdef CONFIG_BFQ_GROUP_IOSCHED
        blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq);
 #else
        spin_lock_irq(&bfqd->lock);