diff --git a/fs/io_uring.c b/fs/io_uring.c index 8018c7076b25ce66a8215500ffa3531d43f4204b..a170488507cfff37166c7472642efb9d48fa7661 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6846,13 +6846,8 @@ static int io_run_task_work_sig(void) return 1; if (!signal_pending(current)) return 0; - if (current->jobctl & JOBCTL_TASK_WORK) { - spin_lock_irq(¤t->sighand->siglock); - current->jobctl &= ~JOBCTL_TASK_WORK; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); - return 1; - } + if (test_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL)) + return -ERESTARTSYS; return -EINTR; }