]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/memmap: reuse io_free_region for failure path
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 29 Nov 2024 13:34:27 +0000 (13:34 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Dec 2024 15:17:15 +0000 (08:17 -0700)
commit226ae1b4d1111b0b0041677b58371af9b8cd31a9
treea80080739353085fd6e0f56e560702290cf673b4
parentfc5f22a64649db7582f988d01651fa7d50054f90
io_uring/memmap: reuse io_free_region for failure path

Regions are going to become more complex with allocation options and
optimisations, I want to split initialisation into steps and for that it
needs a sane fail path. Reuse io_free_region(), it's smart enough to
undo only what's needed and leaves the structure in a consistent state.

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