mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
io_uring/cmd: optimise !CONFIG_COMPAT flags setting
Use io_is_compat() to avoid extra overhead in io_uring_cmd() for flag setting when compat is compiled out. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Link: https://lore.kernel.org/r/f4d74c62d7cbddc386c0a9138ecd2b2ed6d3f146.1740400452.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
3035deac0c
commit
0bba6fccbd
@@ -237,7 +237,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
|
||||
issue_flags |= IO_URING_F_SQE128;
|
||||
if (ctx->flags & IORING_SETUP_CQE32)
|
||||
issue_flags |= IO_URING_F_CQE32;
|
||||
if (ctx->compat)
|
||||
if (io_is_compat(ctx))
|
||||
issue_flags |= IO_URING_F_COMPAT;
|
||||
if (ctx->flags & IORING_SETUP_IOPOLL) {
|
||||
if (!file->f_op->uring_cmd_iopoll)
|
||||
|
||||
Reference in New Issue
Block a user