OSDN Git Service

io_uring: add support for IORING_OP_CLOSE
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Dec 2019 21:02:38 +0000 (14:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2020 00:01:53 +0000 (17:01 -0700)
commitb5dba59e0cf7e2cc4d3b3b1ac5fe81ddf21959eb
tree3e08555974f383d3da5d064dbbc75c6c833091a6
parent0c9d5ccd26a004f59333c06fbbb98f9cb1eed93d
io_uring: add support for IORING_OP_CLOSE

This works just like close(2), unsurprisingly. We remove the file
descriptor and post the completion inline, then offload the actual
(potential) last file put to async context.

Mark the async part of this work as uncancellable, as we really must
guarantee that the latter part of the close is run.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h