A preparation patch adding a simple helper for gauging the compat state. It'll help us to optimise and compile out more code in the following commits. Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> --- io_uring/io_uring.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index 650f81dac5d0..daf0e3b740ee 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -147,6 +147,11 @@ static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx) #endif } +static inline bool io_is_compat(struct io_ring_ctx *ctx) +{ + return IS_ENABLED(CONFIG_COMPAT) && unlikely(ctx->compat); +} + static inline void io_req_task_work_add(struct io_kiocb *req) { __io_req_task_work_add(req, 0); -- 2.48.1