io_uring: don't guard IORING_OFF_PBUF_RING with SETUP_NO_MMAP
authorJens Axboe <axboe@kernel.dk>
Tue, 28 Nov 2023 00:08:19 +0000 (17:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:52:19 +0000 (08:52 +0100)
commitb797b7f83e537875cf22b89f673baee492407589
tree0dd79caa3a35e1a739fdcd2afcbe1a519eb8e67f
parent5f1a233efee8f4c98985210e54f0746d7d6ade17
io_uring: don't guard IORING_OFF_PBUF_RING with SETUP_NO_MMAP

commit 6f007b1406637d3d73d42e41d7e8d9b245185e69 upstream.

This flag only applies to the SQ and CQ rings, it's perfectly valid
to use a mmap approach for the provided ring buffers. Move the
check into where it belongs.

Cc: stable@vger.kernel.org
Fixes: 03d89a2de25b ("io_uring: support for user allocated memory for rings/sqes")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c