block: fix revalidate performance regression
[platform/kernel/linux-starfive.git] / block / bfq-iosched.c
index ff9d238..52eb79d 100644 (file)
@@ -637,6 +637,8 @@ retry:
                                        sched_data->service_tree[i].wsum;
                        }
                }
+               if (!wsum)
+                       continue;
                limit = DIV_ROUND_CLOSEST(limit * entity->weight, wsum);
                if (entity->allocated >= limit) {
                        bfq_log_bfqq(bfqq->bfqd, bfqq,