Commit c5020bc8 authored by Olivier Langlois's avatar Olivier Langlois Committed by Jens Axboe

io_uring: Remove unneeded test in io_run_task_work_sig()

Avoid testing TIF_NOTIFY_SIGNAL twice by calling task_sigpending()
directly from io_run_task_work_sig()
Signed-off-by: default avatarOlivier Langlois <olivier@trillion01.com>
Link: https://lore.kernel.org/r/bd7c0495f7656e803e5736708591bb665e6eaacd.1645041650.git.olivier@trillion01.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 502c87d6
...@@ -7704,11 +7704,11 @@ static int io_run_task_work_sig(void) ...@@ -7704,11 +7704,11 @@ static int io_run_task_work_sig(void)
{ {
if (io_run_task_work()) if (io_run_task_work())
return 1; return 1;
if (!signal_pending(current))
return 0;
if (test_thread_flag(TIF_NOTIFY_SIGNAL)) if (test_thread_flag(TIF_NOTIFY_SIGNAL))
return -ERESTARTSYS; return -ERESTARTSYS;
return -EINTR; if (task_sigpending(current))
return -EINTR;
return 0;
} }
/* when returns >0, the caller should retry */ /* when returns >0, the caller should retry */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment