io_uring: check IOPOLL/ioprio support upfront
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 17:34:56 +0000 (11:34 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 5 May 2022 23:09:15 +0000 (17:09 -0600)
commit73911426aaaadbae54fa72359b33a7b6a56947db
treeb7beb65b5171236562b119189a0c6b6263e85f8a
parentf2e030dd7aaea5a937a2547dc980fab418fbc5e7
io_uring: check IOPOLL/ioprio support upfront

Don't punt this check to the op prep handlers, add the support to
io_op_defs and we can check them while setting up the request.

This reduces the text size by 500 bytes on aarch64, and makes this less
fragile by having the check in one spot and needing opcodes to opt in
to IOPOLL or ioprio support.

Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c