]> git.itanic.dy.fi Git - linux-stable/commit
io_uring/rsrc: cleanup io_pin_pages()
authorJens Axboe <axboe@kernel.dk>
Tue, 3 Oct 2023 00:25:23 +0000 (18:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Oct 2023 00:25:23 +0000 (18:25 -0600)
commit922a2c78f13611e2c08fc48f615c0cd367dcb6da
treedbbc6aada738d873a49ef7c97b24deefc35021aa
parent93b8cc60c37b9d17732b7a297e5dca29b50a990d
io_uring/rsrc: cleanup io_pin_pages()

This function is overly convoluted with a goto error path, and checks
under the mmap_read_lock() that don't need to be at all. Rearrange it
a bit so the checks and errors fall out naturally, rather than needing
to jump around for it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c