Merge branch 'for-6.5/block-late' into block-6.5
[linux-2.6-block.git] / block / blk-cgroup.c
index aaf9903ad7b2fd8e33ea2fb0d71f28396529b87f..fc49be622e05b159e3a3a5fb5f717383cd325c93 100644 (file)
@@ -2086,6 +2086,9 @@ void blk_cgroup_bio_start(struct bio *bio)
        struct blkg_iostat_set *bis;
        unsigned long flags;
 
+       if (!cgroup_subsys_on_dfl(io_cgrp_subsys))
+               return;
+
        /* Root-level stats are sourced from system-wide IO stats */
        if (!cgroup_parent(blkcg->css.cgroup))
                return;
@@ -2116,8 +2119,7 @@ void blk_cgroup_bio_start(struct bio *bio)
        }
 
        u64_stats_update_end_irqrestore(&bis->sync, flags);
-       if (cgroup_subsys_on_dfl(io_cgrp_subsys))
-               cgroup_rstat_updated(blkcg->css.cgroup, cpu);
+       cgroup_rstat_updated(blkcg->css.cgroup, cpu);
        put_cpu();
 }