diff options
-rw-r--r-- | kernel/sched/cputime.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 26a54461bf59..05de80b48586 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -788,6 +788,9 @@ cputime_t task_gtime(struct task_struct *t) | |||
788 | unsigned int seq; | 788 | unsigned int seq; |
789 | cputime_t gtime; | 789 | cputime_t gtime; |
790 | 790 | ||
791 | if (!context_tracking_is_enabled()) | ||
792 | return t->gtime; | ||
793 | |||
791 | do { | 794 | do { |
792 | seq = read_seqbegin(&t->vtime_seqlock); | 795 | seq = read_seqbegin(&t->vtime_seqlock); |
793 | 796 | ||