io_uring/rsrc: check for nonconsecutive pages
authorTobias Holl <tobias@tholl.xyz>
Wed, 3 May 2023 14:59:50 +0000 (08:59 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 3 May 2023 15:00:22 +0000 (09:00 -0600)
commit776617db78c6d208780e7c69d4d68d1fa82913de
tree8c81c3a20db72058af205842f0c34a809f64c830
parent3c85cc43c8e7855d202da184baf00c7b8eeacf71
io_uring/rsrc: check for nonconsecutive pages

Pages that are from the same folio do not necessarily need to be
consecutive. In that case, we cannot consolidate them into a single bvec
entry. Before applying the huge page optimization from commit 57bebf807e2a
("io_uring/rsrc: optimise registered huge pages"), check that the memory
is actually consecutive.

Cc: stable@vger.kernel.org
Fixes: 57bebf807e2a ("io_uring/rsrc: optimise registered huge pages")
Signed-off-by: Tobias Holl <tobias@tholl.xyz>
[axboe: formatting]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c