diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-01-11 06:41:59 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-01-11 07:02:08 -0500 |
commit | 4de98a2712764bceb9e0f67b1ac2f2c7862feb77 (patch) | |
tree | 94861af51e19af917d80952dfabeaa7a76901eaa /linux/kthread.c | |
parent | f8cbede6d18e81c804e62fd7d576310b420dcaac (diff) |
Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily
Diffstat (limited to 'linux/kthread.c')
-rw-r--r-- | linux/kthread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/kthread.c b/linux/kthread.c index 0f4b5715..80a9ac9a 100644 --- a/linux/kthread.c +++ b/linux/kthread.c @@ -64,6 +64,7 @@ struct task_struct *kthread_create(int (*thread_fn)(void *data), vsnprintf(p->comm, sizeof(p->comm), namefmt, args); va_end(args); + p->flags |= PF_KTHREAD; p->thread_fn = thread_fn; p->thread_data = thread_data; p->state = TASK_UNINTERRUPTIBLE; @@ -73,6 +74,7 @@ struct task_struct *kthread_create(int (*thread_fn)(void *data), init_completion(&p->exited); pthread_create(&p->thread, NULL, kthread_start_fn, p); + pthread_setname_np(p->thread, p->comm); return p; } |