summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@trillion01.com>2022-02-16 22:53:42 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-10 16:32:49 +0300
commitc5020bc8d9295ad4a3e09d858a28b26a25d4afab (patch)
tree474921103c6db40f32bb4f7ad3492610c945175c /fs/io_uring.c
parent502c87d65564cbfd65b1621309bcd900390eca81 (diff)
downloadlinux-c5020bc8d9295ad4a3e09d858a28b26a25d4afab.tar.xz
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: Olivier Langlois <olivier@trillion01.com> Link: https://lore.kernel.org/r/bd7c0495f7656e803e5736708591bb665e6eaacd.1645041650.git.olivier@trillion01.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 5ec24b0438f1..8d3454a243b4 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7704,11 +7704,11 @@ static int io_run_task_work_sig(void)
{
if (io_run_task_work())
return 1;
- if (!signal_pending(current))
- return 0;
if (test_thread_flag(TIF_NOTIFY_SIGNAL))
return -ERESTARTSYS;
- return -EINTR;
+ if (task_sigpending(current))
+ return -EINTR;
+ return 0;
}
/* when returns >0, the caller should retry */