Merge tag 'drm-fixes-2023-01-01' of git://anongit.freedesktop.org/drm/drm
[platform/kernel/linux-rpi.git] / block / bfq-wf2q.c
index b02b536..ea4c3d7 100644 (file)
@@ -1612,28 +1612,28 @@ void bfq_requeue_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq,
 
 void bfq_add_bfqq_in_groups_with_pending_reqs(struct bfq_queue *bfqq)
 {
+#ifdef CONFIG_BFQ_GROUP_IOSCHED
        struct bfq_entity *entity = &bfqq->entity;
 
        if (!entity->in_groups_with_pending_reqs) {
                entity->in_groups_with_pending_reqs = true;
-#ifdef CONFIG_BFQ_GROUP_IOSCHED
                if (!(bfqq_group(bfqq)->num_queues_with_pending_reqs++))
                        bfqq->bfqd->num_groups_with_pending_reqs++;
-#endif
        }
+#endif
 }
 
 void bfq_del_bfqq_in_groups_with_pending_reqs(struct bfq_queue *bfqq)
 {
+#ifdef CONFIG_BFQ_GROUP_IOSCHED
        struct bfq_entity *entity = &bfqq->entity;
 
        if (entity->in_groups_with_pending_reqs) {
                entity->in_groups_with_pending_reqs = false;
-#ifdef CONFIG_BFQ_GROUP_IOSCHED
                if (!(--bfqq_group(bfqq)->num_queues_with_pending_reqs))
                        bfqq->bfqd->num_groups_with_pending_reqs--;
-#endif
        }
+#endif
 }
 
 /*