summaryrefslogtreecommitdiffstats
path: root/block/bfq-cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bfq-cgroup.c')
-rw-r--r--block/bfq-cgroup.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index b3796a40a61a..66abc82179f3 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -935,9 +935,9 @@ static u64 bfqg_prfill_stat_recursive(struct seq_file *sf,
935static u64 bfqg_prfill_rwstat_recursive(struct seq_file *sf, 935static u64 bfqg_prfill_rwstat_recursive(struct seq_file *sf,
936 struct blkg_policy_data *pd, int off) 936 struct blkg_policy_data *pd, int off)
937{ 937{
938 struct blkg_rwstat sum = blkg_rwstat_recursive_sum(pd_to_blkg(pd), 938 struct blkg_rwstat sum;
939 &blkcg_policy_bfq, 939
940 off); 940 blkg_rwstat_recursive_sum(pd_to_blkg(pd), &blkcg_policy_bfq, off, &sum);
941 return __blkg_prfill_rwstat(sf, pd, &sum); 941 return __blkg_prfill_rwstat(sf, pd, &sum);
942} 942}
943 943
@@ -975,9 +975,12 @@ static int bfqg_print_stat_sectors(struct seq_file *sf, void *v)
975static u64 bfqg_prfill_sectors_recursive(struct seq_file *sf, 975static u64 bfqg_prfill_sectors_recursive(struct seq_file *sf,
976 struct blkg_policy_data *pd, int off) 976 struct blkg_policy_data *pd, int off)
977{ 977{
978 struct blkg_rwstat tmp = blkg_rwstat_recursive_sum(pd->blkg, NULL, 978 struct blkg_rwstat tmp;
979 offsetof(struct blkcg_gq, stat_bytes)); 979 u64 sum;
980 u64 sum = atomic64_read(&tmp.aux_cnt[BLKG_RWSTAT_READ]) + 980
981 blkg_rwstat_recursive_sum(pd->blkg, NULL,
982 offsetof(struct blkcg_gq, stat_bytes), &tmp);
983 sum = atomic64_read(&tmp.aux_cnt[BLKG_RWSTAT_READ]) +
981 atomic64_read(&tmp.aux_cnt[BLKG_RWSTAT_WRITE]); 984 atomic64_read(&tmp.aux_cnt[BLKG_RWSTAT_WRITE]);
982 985
983 return __blkg_prfill_u64(sf, pd, sum >> 9); 986 return __blkg_prfill_u64(sf, pd, sum >> 9);