diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-02-20 15:17:18 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-21 17:18:56 -0700 |
commit | b6c23dd5a483174f386e4c2e1711d9532e090c00 (patch) | |
tree | 052e738e5cf894cf1c505777eaa4c7a8301be60d /fs | |
parent | ebf4a5db690a47e71056381ead8a134de7202694 (diff) | |
download | linux-b6c23dd5a483174f386e4c2e1711d9532e090c00.tar.bz2 |
io_uring: run task_work on io_uring_register()
Do run task_work before io_uring_register(), that might make a first
quiesce round much nicer. We generally do that for any syscall invocation
to avoid spurious -EINTR/-ERESTARTSYS, for task_work that we generate.
This patch brings io_uring_register() inline with the two other io_uring
syscalls.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 1501f20fde84..3ecc3c08bf12 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -10200,6 +10200,8 @@ SYSCALL_DEFINE4(io_uring_register, unsigned int, fd, unsigned int, opcode, ctx = f.file->private_data; + io_run_task_work(); + mutex_lock(&ctx->uring_lock); ret = __io_uring_register(ctx, opcode, arg, nr_args); mutex_unlock(&ctx->uring_lock); |