diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:32:44 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:32:44 +0100 |
commit | 8c5db92a705d9e2c986adec475980d1120fa07b4 (patch) | |
tree | 9f0eea56889819707c0a1a8eb5b1fb2db3cdaf3d /kernel/workqueue_internal.h | |
parent | x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized (diff) | |
parent | Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-8c5db92a705d9e2c986adec475980d1120fa07b4.tar.xz linux-8c5db92a705d9e2c986adec475980d1120fa07b4.zip |
Merge branch 'linus' into locking/core, to resolve conflicts
Conflicts:
include/linux/compiler-clang.h
include/linux/compiler-gcc.h
include/linux/compiler-intel.h
include/uapi/linux/stddef.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/workqueue_internal.h')
-rw-r--r-- | kernel/workqueue_internal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h index 8635417c587b..d390d1be3748 100644 --- a/kernel/workqueue_internal.h +++ b/kernel/workqueue_internal.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * kernel/workqueue_internal.h * @@ -9,6 +10,7 @@ #include <linux/workqueue.h> #include <linux/kthread.h> +#include <linux/preempt.h> struct worker_pool; @@ -59,7 +61,7 @@ struct worker { */ static inline struct worker *current_wq_worker(void) { - if (current->flags & PF_WQ_WORKER) + if (in_task() && (current->flags & PF_WQ_WORKER)) return kthread_data(current); return NULL; } |