Skip to content

Commit aa165d6

Browse files
isilenceaxboe
authored andcommitted
Revert "io_uring: add buffer selection support to IORING_OP_NOP"
This reverts commit 3d20024. Buffer selection with nops was used for debugging and benchmarking but is useless in real life. Let's revert it before it's released. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/c5012098ca6b51dfbdcb190f8c4e3c0bf1c965dc.1655224415.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 8899ce4 commit aa165d6

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

fs/io_uring.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,6 @@ static const struct io_op_def io_op_defs[] = {
11141114
[IORING_OP_NOP] = {
11151115
.audit_skip = 1,
11161116
.iopoll = 1,
1117-
.buffer_select = 1,
11181117
},
11191118
[IORING_OP_READV] = {
11201119
.needs_file = 1,
@@ -5269,19 +5268,7 @@ static int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
52695268
*/
52705269
static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
52715270
{
5272-
unsigned int cflags;
5273-
void __user *buf;
5274-
5275-
if (req->flags & REQ_F_BUFFER_SELECT) {
5276-
size_t len = 1;
5277-
5278-
buf = io_buffer_select(req, &len, issue_flags);
5279-
if (!buf)
5280-
return -ENOBUFS;
5281-
}
5282-
5283-
cflags = io_put_kbuf(req, issue_flags);
5284-
__io_req_complete(req, issue_flags, 0, cflags);
5271+
__io_req_complete(req, issue_flags, 0, 0);
52855272
return 0;
52865273
}
52875274

0 commit comments

Comments
 (0)