diff options
-rw-r--r-- | block/blk-throttle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 1474c3ab7e72..15998784c00e 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1292,6 +1292,9 @@ static u64 tg_prfill_cpu_rwstat(struct seq_file *sf, struct blkg_rwstat rwstat = { }, tmp; int i, cpu; + if (tg->stats_cpu == NULL) + return 0; + for_each_possible_cpu(cpu) { struct tg_stats_cpu *sc = per_cpu_ptr(tg->stats_cpu, cpu); |