io_uring: any deferred command must have stable sqe data
authorJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2019 18:55:28 +0000 (11:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Dec 2019 02:57:20 +0000 (19:57 -0700)
commit8ed8d3c3bc32bf5b442c9f54013b4a47d5cae740
tree7ff15ab48b1be79fea05cef6444c8cebd75b6fb1
parentfc4df999e24fc3006441acd4ce6250e6a76ac851
io_uring: any deferred command must have stable sqe data

We're currently not retaining sqe data for accept, fsync, and
sync_file_range. None of these commands need data outside of what
is directly provided, hence it can't go stale when the request is
deferred. However, it can get reused, if an application reuses
SQE entries.

Ensure that we retain the information we need and only read the sqe
contents once, off the submission path. Most of this is just moving
code into a prep and finish function.

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