diff options
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r-- | kernel/kthread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 2f26adea0f84..26db528c1d88 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/freezer.h> | 20 | #include <linux/freezer.h> |
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <linux/cgroup.h> | ||
23 | #include <trace/events/sched.h> | 24 | #include <trace/events/sched.h> |
24 | 25 | ||
25 | static DEFINE_SPINLOCK(kthread_create_lock); | 26 | static DEFINE_SPINLOCK(kthread_create_lock); |
@@ -225,6 +226,7 @@ static int kthread(void *_create) | |||
225 | 226 | ||
226 | ret = -EINTR; | 227 | ret = -EINTR; |
227 | if (!test_bit(KTHREAD_SHOULD_STOP, &self->flags)) { | 228 | if (!test_bit(KTHREAD_SHOULD_STOP, &self->flags)) { |
229 | cgroup_kthread_ready(); | ||
228 | __kthread_parkme(self); | 230 | __kthread_parkme(self); |
229 | ret = threadfn(data); | 231 | ret = threadfn(data); |
230 | } | 232 | } |
@@ -538,6 +540,7 @@ int kthreadd(void *unused) | |||
538 | set_mems_allowed(node_states[N_MEMORY]); | 540 | set_mems_allowed(node_states[N_MEMORY]); |
539 | 541 | ||
540 | current->flags |= PF_NOFREEZE; | 542 | current->flags |= PF_NOFREEZE; |
543 | cgroup_init_kthreadd(); | ||
541 | 544 | ||
542 | for (;;) { | 545 | for (;;) { |
543 | set_current_state(TASK_INTERRUPTIBLE); | 546 | set_current_state(TASK_INTERRUPTIBLE); |