blk-cgroup: cgroup_rstat_updated() shouldn't be called on cgroup1
[sfrench/cifs-2.6.git] / include / linux / blk-cgroup.h
index 48a66738143dff1d007ffc49ff768fd05d05532e..19394c77ed9955ac0b949f8a536f9ed4fbbace08 100644 (file)
@@ -626,7 +626,8 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q,
                bis->cur.ios[rwd]++;
 
                u64_stats_update_end(&bis->sync);
-               cgroup_rstat_updated(blkg->blkcg->css.cgroup, cpu);
+               if (cgroup_subsys_on_dfl(io_cgrp_subsys))
+                       cgroup_rstat_updated(blkg->blkcg->css.cgroup, cpu);
                put_cpu();
        }