io_uring: Fix mm_fault with READ/WRITE_FIXED
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 27 Oct 2019 20:15:41 +0000 (23:15 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Oct 2019 16:24:23 +0000 (10:24 -0600)
commit95a1b3ff9a3e4ea2f26c4e802067d58831f415db
tree6aa8d6d48b9faf66f33487baeeb259c4c7ea2d35
parentfa4562280889ad372dfb1413833a8b8675721b17
io_uring: Fix mm_fault with READ/WRITE_FIXED

Commit fb5ccc98782f ("io_uring: Fix broken links with offloading")
introduced a potential performance regression with unconditionally
taking mm even for READ/WRITE_FIXED operations.

Return the logic handling it back. mm-faulted requests will go through
the generic submission path, so honoring links and drains, but will
fail further on req->has_user check.

Fixes: fb5ccc98782f ("io_uring: Fix broken links with offloading")
Cc: stable@vger.kernel.org # v5.4
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c