summaryrefslogtreecommitdiffstats
path: root/include/linux/kthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kthread.h')
-rw-r--r--include/linux/kthread.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 86d53a3cb497f..3203e36b2ee81 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -4,6 +4,7 @@
/* Simple interface for creating and stopping kernel threads without mess. */
#include <linux/err.h>
#include <linux/sched.h>
+#include <linux/cgroup.h>
__printf(4, 5)
struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
@@ -199,4 +200,14 @@ bool kthread_cancel_delayed_work_sync(struct kthread_delayed_work *work);
void kthread_destroy_worker(struct kthread_worker *worker);
+#ifdef CONFIG_BLK_CGROUP
+void kthread_associate_blkcg(struct cgroup_subsys_state *css);
+struct cgroup_subsys_state *kthread_blkcg(void);
+#else
+static inline void kthread_associate_blkcg(struct cgroup_subsys_state *css) { }
+static inline struct cgroup_subsys_state *kthread_blkcg(void)
+{
+ return NULL;
+}
+#endif
#endif /* _LINUX_KTHREAD_H */