Skip to content

Commit 599593a

Browse files
committed
sched: make task_struct->plug always defined
If CONFIG_BLOCK isn't set, then it's an empty struct anyway. Just make it generally available, so we don't break the compile: kernel/sched/core.c: In function ‘sched_submit_work’: kernel/sched/core.c:6346:35: error: ‘struct task_struct’ has no member named ‘plug’ 6346 | blk_flush_plug(tsk->plug, true); | ^~ kernel/sched/core.c: In function ‘io_schedule_prepare’: kernel/sched/core.c:8357:20: error: ‘struct task_struct’ has no member named ‘plug’ 8357 | if (current->plug) | ^~ kernel/sched/core.c:8358:39: error: ‘struct task_struct’ has no member named ‘plug’ 8358 | blk_flush_plug(current->plug, true); | ^~ Reported-by: Nathan Chancellor <[email protected]> Fixes: 008f75a ("block: cleanup the flush plug helpers") Signed-off-by: Jens Axboe <[email protected]>
1 parent 8bdf7b3 commit 599593a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

include/linux/sched.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,10 +1160,8 @@ struct task_struct {
11601160
/* Stacked block device info: */
11611161
struct bio_list *bio_list;
11621162

1163-
#ifdef CONFIG_BLOCK
11641163
/* Stack plugging: */
11651164
struct blk_plug *plug;
1166-
#endif
11671165

11681166
/* VM state: */
11691167
struct reclaim_state *reclaim_state;

0 commit comments

Comments
 (0)