diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 0db535b79be7..97a81225d037 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -26,15 +26,16 @@ static inline bool context_tracking_is_enabled(void) { return static_key_false(&context_tracking_enabled); } + +static inline bool context_tracking_cpu_is_enabled(void) +{ + return __this_cpu_read(context_tracking.active); +} + static inline bool context_tracking_in_user(void) { return __this_cpu_read(context_tracking.state) == IN_USER; } - -static inline bool context_tracking_active(void) -{ - return __this_cpu_read(context_tracking.active); -} #else static inline bool context_tracking_in_user(void) { return false; } static inline bool context_tracking_active(void) { return false; } diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 807c732cbf29..c5165fd256f9 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h @@ -20,7 +20,7 @@ static inline bool vtime_accounting_enabled(void) { return true; } static inline bool vtime_accounting_enabled(void) { if (context_tracking_is_enabled()) { - if (context_tracking_active()) + if (context_tracking_cpu_is_enabled()) return true; }