summaryrefslogtreecommitdiff
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 10:33:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 10:33:30 +0300
commit924fb3ec50f5156d21e4f484358fb36f75b91ca8 (patch)
treef36b768432fe7f7c07b28857533e1bfe16006abe /block/blk-cgroup.c
parent4f6dfc2136fb2e8dc3f571a5caff6b6e88281fc0 (diff)
parent4ec5183ec48656cec489c49f989c508b68b518e3 (diff)
downloadlinux-924fb3ec50f5156d21e4f484358fb36f75b91ca8.tar.xz
Merge 6.2-rc7 into usb-next
We need the USB fixes in here, and this resolves a merge conflict with the i915 driver as reported in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 4c94a6560f62..9ac1efb053e0 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -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);