OSDN Git Service

Merge tag 'for-6.3/dio-2023-02-16' of git://git.kernel.dk/linux
[tomoyo/tomoyo-test1.git] / block / blk-cgroup.c
index 4c94a65..9ac1efb 100644 (file)
@@ -2001,6 +2001,10 @@ void blk_cgroup_bio_start(struct bio *bio)
        struct blkg_iostat_set *bis;
        unsigned long flags;
 
+       /* Root-level stats are sourced from system-wide IO stats */
+       if (!cgroup_parent(blkcg->css.cgroup))
+               return;
+
        cpu = get_cpu();
        bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
        flags = u64_stats_update_begin_irqsave(&bis->sync);