History

block: fix a build error

The code is only for blkcg not for all cgroups

Shaohua Li committed 9 years ago

Commit 0b508bc1 parent 9979d543 files · +6 −6Browse files

Showing the changes to kernel/kthread.c (1 of 3 files). Show all

Unified · Split

kernel/kthread.c+4−4
@@ -46,7 +46,7 @@ struct kthread { · 45 unmodified lines
46 void *data;46 void *data;
47 struct completion parked;47 struct completion parked;
48 struct completion exited;48 struct completion exited;
49#ifdef CONFIG_CGROUPS49#ifdef CONFIG_BLK_CGROUP
50 struct cgroup_subsys_state *blkcg_css;50 struct cgroup_subsys_state *blkcg_css;
51#endif51#endif
52};52};
@@ -83,7 +83,7 @@ void free_kthread_struct(struct task_struct *k) · 30 unmodified lines
83 * or if kmalloc() in kthread() failed.83 * or if kmalloc() in kthread() failed.
84 */84 */
85 kthread = to_kthread(k);85 kthread = to_kthread(k);
86#ifdef CONFIG_CGROUPS86#ifdef CONFIG_BLK_CGROUP
87 WARN_ON_ONCE(kthread && kthread->blkcg_css);87 WARN_ON_ONCE(kthread && kthread->blkcg_css);
88#endif88#endif
89 kfree(kthread);89 kfree(kthread);
@@ -224,7 +224,7 @@ static int kthread(void *_create) · 134 unmodified lines
224 self->data = data;224 self->data = data;
225 init_completion(&self->exited);225 init_completion(&self->exited);
226 init_completion(&self->parked);226 init_completion(&self->parked);
227#ifdef CONFIG_CGROUPS227#ifdef CONFIG_BLK_CGROUP
228 self->blkcg_css = NULL;228 self->blkcg_css = NULL;
229#endif229#endif
230 current->vfork_done = &self->exited;230 current->vfork_done = &self->exited;
@@ -1166,7 +1166,7 @@ void kthread_destroy_worker(struct kthread_worker *worker) · 935 unmodified lines
1166}1166}
1167EXPORT_SYMBOL(kthread_destroy_worker);1167EXPORT_SYMBOL(kthread_destroy_worker);
1168 1168
1169#ifdef CONFIG_CGROUPS1169#ifdef CONFIG_BLK_CGROUP
1170/**1170/**
1171 * kthread_associate_blkcg - associate blkcg to current kthread1171 * kthread_associate_blkcg - associate blkcg to current kthread
1172 * @css: the cgroup info1172 * @css: the cgroup info

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t