io_uring: fix provided buffer import
authorDylan Yudaken <dylany@fb.com>
Thu, 30 Jun 2022 13:20:06 +0000 (06:20 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Jun 2022 17:34:41 +0000 (11:34 -0600)
commit09007af2b627f0f195c6c53c4829b285cc3990ec
tree3546a6c5ce9a20d1a6170e406d990b67e330e849
parent29c1ac230e6056b26846c66881802b581a78ad72
io_uring: fix provided buffer import

io_import_iovec uses the s pointer, but this was changed immediately
after the iovec was re-imported and so it was imported into the wrong
place.

Change the ordering.

Fixes: 2be2eb02e2f5 ("io_uring: ensure reads re-import for selected buffers")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220630132006.2825668-1-dylany@fb.com
[axboe: ensure we don't half-import as well]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c