• J
    sched: make task_struct->plug always defined · 599593a8
    Jens Axboe 提交于
    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: NNathan Chancellor <nathan@kernel.org>
    Fixes: 008f75a2 ("block: cleanup the flush plug helpers")
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    599593a8
sched.h 64.5 KB