diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-05-13 18:26:51 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-05-13 14:45:55 -0600 |
| commit | 2b61bb1d9aa601ec393054a61be0a707a5bea928 (patch) | |
| tree | 2327a0b9b0d46e1855ab29b8d9ee1c92192cabb7 /io_uring/opdef.c | |
| parent | c724e801239ffc3714afe65cf6e721ddd04199d0 (diff) | |
| download | lwn-2b61bb1d9aa601ec393054a61be0a707a5bea928.tar.gz lwn-2b61bb1d9aa601ec393054a61be0a707a5bea928.zip | |
io_uring/kbuf: unify legacy buf provision and removal
Combine IORING_OP_PROVIDE_BUFFERS and IORING_OP_REMOVE_BUFFERS
->issue(), so that we can deduplicate ring locking and list lookups.
This way we further reduce code for legacy provided buffers. Locking is
also separated from buffer related handling, which makes it a bit
simpler with label jumps.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f61af131622ad4337c2fb9f7c453d5b0102c7b90.1747150490.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/opdef.c')
| -rw-r--r-- | io_uring/opdef.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/opdef.c b/io_uring/opdef.c index db36433c2294..6e0882b051f9 100644 --- a/io_uring/opdef.c +++ b/io_uring/opdef.c @@ -333,13 +333,13 @@ const struct io_issue_def io_issue_defs[] = { .audit_skip = 1, .iopoll = 1, .prep = io_provide_buffers_prep, - .issue = io_provide_buffers, + .issue = io_manage_buffers_legacy, }, [IORING_OP_REMOVE_BUFFERS] = { .audit_skip = 1, .iopoll = 1, .prep = io_remove_buffers_prep, - .issue = io_remove_buffers, + .issue = io_manage_buffers_legacy, }, [IORING_OP_TEE] = { .needs_file = 1, |
