sched: Remove pointless preemption disable in sched_submit_work()

From: Thomas Gleixner
Date: Tue Sep 28 2021 - 10:30:40 EST


Neither wq_worker_sleeping() nor io_wq_worker_sleeping() require to be invoked
with preemption disabled:

- The worker flag checks operations only need to be serialized against
the worker thread itself.

- The accounting and worker pool operations are serialized with locks.

which means that disabling preemption has neither a reason nor a
value. Remove it.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
kernel/sched/core.c | 2 --
1 file changed, 2 deletions(-)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6327,12 +6327,10 @@ static inline void sched_submit_work(str
* requires it.
*/
if (task_flags & (PF_WQ_WORKER | PF_IO_WORKER)) {
- preempt_disable();
if (task_flags & PF_WQ_WORKER)
wq_worker_sleeping(tsk);
else
io_wq_worker_sleeping(tsk);
- preempt_enable_no_resched();
}

if (tsk_is_pi_blocked(tsk))