summaryrefslogtreecommitdiffstats
path: root/kernel/kthread.c
diff options
context:
space:
mode:
authorShaohua Li2017-09-26 20:02:12 +0200
committerJens Axboe2017-09-26 20:07:24 +0200
commit0b508bc926bdced678febee2a2b8cdba0a19e481 (patch)
tree79a143e9857e44b1d28628bf88e188cd476db650 /kernel/kthread.c
parentblock: cryptoloop - Fix build warning (diff)
downloadkernel-qcow2-linux-0b508bc926bdced678febee2a2b8cdba0a19e481.tar.gz
kernel-qcow2-linux-0b508bc926bdced678febee2a2b8cdba0a19e481.tar.xz
kernel-qcow2-linux-0b508bc926bdced678febee2a2b8cdba0a19e481.zip
block: fix a build error
The code is only for blkcg not for all cgroups Fixes: d4478e92d618 ("block/loop: make loop cgroup aware") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r--kernel/kthread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index b011ea08967f..f87cd8b4eb2a 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -46,7 +46,7 @@ struct kthread {
void *data;
struct completion parked;
struct completion exited;
-#ifdef CONFIG_CGROUPS
+#ifdef CONFIG_BLK_CGROUP
struct cgroup_subsys_state *blkcg_css;
#endif
};
@@ -83,7 +83,7 @@ void free_kthread_struct(struct task_struct *k)
* or if kmalloc() in kthread() failed.
*/
kthread = to_kthread(k);
-#ifdef CONFIG_CGROUPS
+#ifdef CONFIG_BLK_CGROUP
WARN_ON_ONCE(kthread && kthread->blkcg_css);
#endif
kfree(kthread);
@@ -224,7 +224,7 @@ static int kthread(void *_create)
self->data = data;
init_completion(&self->exited);
init_completion(&self->parked);
-#ifdef CONFIG_CGROUPS
+#ifdef CONFIG_BLK_CGROUP
self->blkcg_css = NULL;
#endif
current->vfork_done = &self->exited;
@@ -1166,7 +1166,7 @@ void kthread_destroy_worker(struct kthread_worker *worker)
}
EXPORT_SYMBOL(kthread_destroy_worker);
-#ifdef CONFIG_CGROUPS
+#ifdef CONFIG_BLK_CGROUP
/**
* kthread_associate_blkcg - associate blkcg to current kthread
* @css: the cgroup info