projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62aa980
)
io_uring: introduce io_is_compat()
author
Pavel Begunkov
<asml.silence@gmail.com>
Mon, 24 Feb 2025 12:42:19 +0000
(12:42 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 24 Feb 2025 14:34:21 +0000
(07:34 -0700)
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@gmail.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Link:
https://lore.kernel.org/r/1a87a640265196a67bc38300128e0bfd7839ab1f.1740400452.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.h
patch
|
blob
|
blame
|
history
diff --git
a/io_uring/io_uring.h
b/io_uring/io_uring.h
index 6c46d9cdd7aa828d08dae95d9a309f552bb1ac4f..d5c9b7a6911d0d915190f740cf8a55aa7cfdc360 100644
(file)
--- 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);