aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-24 19:08:57 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-09-30 16:25:42 +0200
commit081f0cca55dbb1e577ac66ccd018052f6448451d (patch)
tree3dc754a1df4ffc8ec6110c29b6fd1c17ab1f8e3b
parentfs: forward declare struct bio to avoid compiler warning (diff)
downloadrhel7-kernel-misery-081f0cca55dbb1e577ac66ccd018052f6448451d.tar.xz
rhel7-kernel-misery-081f0cca55dbb1e577ac66ccd018052f6448451d.zip
sched: sched_info requires CONFIG_SCHEDSTATS
Because the sched_info symbol is only defined for CONFIG_SCHEDSTATS kernels, we shouldn't include it inside other structs in this case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--kernel/sched/sched.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index f5842fb3671..ac44dd36e78 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -733,11 +733,12 @@ struct rq {
RH_KABI_EXTEND(struct callback_head *balance_callback)
#ifndef __GENKSYMS__
- /* CONFIG_SCHEDSTATS */
+#ifdef CONFIG_SCHEDSTATS
/* latency stats */
struct sched_info rq_sched_info;
unsigned long long rq_cpu_time;
/* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
+#endif
/* sys_sched_yield() stats */
unsigned int yld_count;