From: Chunguang Xu Date: Tue, 13 Apr 2021 01:39:05 +0000 (+0800) Subject: cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ffeee417d97f9171bce9f43c22c9f477e4c84f54;p=linux.git cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io() If delayacct is disabled, then delayacct_is_task_waiting_on_io() always returns false, which causes the statistical value to be wrong. Perhaps tsk->in_iowait is better. Signed-off-by: Chunguang Xu Signed-off-by: Tejun Heo --- diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index a5751784ad740..391aa570369bb 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -727,7 +727,7 @@ int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry) stats->nr_stopped++; break; default: - if (delayacct_is_task_waiting_on_io(tsk)) + if (tsk->in_iowait) stats->nr_io_wait++; break; }