diff options
| author | Mark Brown <broonie@kernel.org> | 2026-09-30 13:37:11 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-30 13:37:11 +0100 |
| commit | 4fb7269358e7d4f3cdd7406db85c52053d7de148 (patch) | |
| tree | 4bd99f72e63fa6b26afa396c4c1bd5d83fd0a6d7 /block | |
| parent | e818ae9edd692e46ec435cf60db5e74abf83e7ff (diff) | |
| parent | 8deb0752fa76101ff2a0c5cdaf837d95ed0d0046 (diff) | |
| download | linux-next-4fb7269358e7d4f3cdd7406db85c52053d7de148.tar.gz linux-next-4fb7269358e7d4f3cdd7406db85c52053d7de148.zip | |
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
Diffstat (limited to 'block')
| -rw-r--r-- | block/blk-cgroup.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index b56db1cc6778..82b66147d778 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1189,10 +1189,17 @@ static int blkcg_print_stat(struct seq_file *sf, void *v) struct blkcg *blkcg = css_to_blkcg(seq_css(sf)); struct blkcg_gq *blkg; - if (!seq_css(sf)->parent) + if (!seq_css(sf)->parent) { blkcg_fill_root_iostats(); - else + } else { + /* + * Descendant blkgs imply ancestor blkgs, so an empty + * ->blkg_list has no stats to report. + */ + if (hlist_empty(&blkcg->blkg_list)) + return 0; css_rstat_flush(&blkcg->css); + } guard(spinlock_irq)(&blkcg->lock); hlist_for_each_entry(blkg, &blkcg->blkg_list, blkcg_node) |
