]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/io_uring.c
io_uring: prepare fixed rw for dynanic buffers
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 25 Apr 2021 13:32:24 +0000 (14:32 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 25 Apr 2021 16:14:04 +0000 (10:14 -0600)
commiteae071c9b4cefbcc3f985c5abf9a6e32c1608ca9
treeb80ef1109fc77602ee2ab118c8321a9e27e605ba
parent41edf1a5ec967bf4bddedb83c48e02dfea8315b4
io_uring: prepare fixed rw for dynanic buffers

With dynamic buffer updates, registered buffers in the table may change
at any moment. First of all we want to prevent future races between
updating and importing (i.e. io_import_fixed()), where the latter one
may happen without uring_lock held, e.g. from io-wq.

Save the first loaded io_mapped_ubuf buffer and reuse.

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