Skip to content
Commit 9eac1904 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: get rid of intermediate IORING_OP_CLOSE stage



We currently split the close into two, in case we have a ->flush op
that we can't safely handle from non-blocking context. This requires
us to flag the op as uncancelable if we do need to punt it async, and
that means special handling for just this op type.

Use __close_fd_get_file() and grab the files lock so we can get the file
and check if we need to go async in one atomic operation. That gets rid
of the need for splitting this into two steps, and hence the need for
IO_WQ_WORK_NO_CANCEL.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 53dec2ea
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