• Jens Axboe's avatar
    io_uring: get rid of intermediate IORING_OP_CLOSE stage · 9eac1904
    Jens Axboe authored
    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>
    9eac1904
io_uring.c 247 KB