io_uring: keep table of pointers to ubufs
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 25 Apr 2021 13:32:23 +0000 (14:32 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 25 Apr 2021 16:14:04 +0000 (10:14 -0600)
commit41edf1a5ec967bf4bddedb83c48e02dfea8315b4
treee5a3dcbdf2fd78d4dabb691e8c9da9040a459b30
parentc3bdad0271834214be01c1d687c262bf80da6eb0
io_uring: keep table of pointers to ubufs

Instead of keeping a table of ubufs convert them into pointers to ubuf,
so we can atomically read one pointer and be sure that the content of
ubuf won't change.

Because it was already dynamically allocating imu->bvec, throw both
imu and bvec into a single structure so they can be allocated together.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b96efa4c5febadeccf41d0e849ac099f4c83b0d3.1619356238.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c