io_uring: JOBCTL_TASK_WORK is no longer used by task_work
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Oct 2020 02:17:18 +0000 (20:17 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 12 Dec 2020 16:17:38 +0000 (09:17 -0700)
Remove the dead code, TWA_SIGNAL will never set JOBCTL_TASK_WORK at
this point.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index 8018c70..a170488 100644 (file)
@@ -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(&current->sighand->siglock);
-               current->jobctl &= ~JOBCTL_TASK_WORK;
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-               return 1;
-       }
+       if (test_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL))
+               return -ERESTARTSYS;
        return -EINTR;
 }