]> asedeno.scripts.mit.edu Git - linux.git/commit
io_uring: set -EINTR directly when a signal wakes up in io_cqring_wait
authorJackie Liu <liuyun01@kylinos.cn>
Tue, 29 Oct 2019 03:16:42 +0000 (11:16 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Nov 2019 14:36:36 +0000 (08:36 -0600)
commite9ffa5c2b77edf2689f876b640318b16fc3ea2a7
tree0c09ee2658611352f73990090afcc6ef8528b92b
parent62755e35dfb2b113c52b81cd96d01c20971c8e02
io_uring: set -EINTR directly when a signal wakes up in io_cqring_wait

We didn't use -ERESTARTSYS to tell the application layer to restart the
system call, but instead return -EINTR. we can set -EINTR directly when
wakeup by the signal, which can help us save an assignment operation and
comparison operation.

Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c