cpufreq: arm_scmi: Set fast_switch_possible conditionally
[linux-2.6-microblaze.git] / block / blk-cgroup.c
index 930212c..0ecc897 100644 (file)
@@ -1530,6 +1530,10 @@ static void blkcg_scale_delay(struct blkcg_gq *blkg, u64 now)
 {
        u64 old = atomic64_read(&blkg->delay_start);
 
+       /* negative use_delay means no scaling, see blkcg_set_delay() */
+       if (atomic_read(&blkg->use_delay) < 0)
+               return;
+
        /*
         * We only want to scale down every second.  The idea here is that we
         * want to delay people for min(delay_nsec, NSEC_PER_SEC) in a certain
@@ -1717,6 +1721,8 @@ void blkcg_schedule_throttle(struct request_queue *q, bool use_memdelay)
  */
 void blkcg_add_delay(struct blkcg_gq *blkg, u64 now, u64 delta)
 {
+       if (WARN_ON_ONCE(atomic_read(&blkg->use_delay) < 0))
+               return;
        blkcg_scale_delay(blkg, now);
        atomic64_add(delta, &blkg->delay_nsec);
 }