From aa165d6d2bb55f8b1bb5047fd634311681316fa2 Mon Sep 17 00:00:00 2001
From: Pavel Begunkov <asml.silence@gmail.com>
Date: Tue, 14 Jun 2022 17:51:17 +0100
Subject: [PATCH] Revert "io_uring: add buffer selection support to
IORING_OP_NOP"
Git-commit: aa165d6d2bb55f8b1bb5047fd634311681316fa2
Patch-mainline: v5.19-rc3
References: bsc#1205205
This reverts commit 3d200242a6c968af321913b635fc4014b238cba4.
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>
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
---
fs/io_uring.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1090,7 +1090,6 @@ struct io_op_def {
static const struct io_op_def io_op_defs[] = {
[IORING_OP_NOP] = {
.iopoll = 1,
- .buffer_select = 1,
},
[IORING_OP_READV] = {
.needs_file = 1,
@@ -4964,19 +4963,7 @@ static int io_nop_prep(struct io_kiocb *
*/
static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
{
- unsigned int cflags;
- void __user *buf;
-
- if (req->flags & REQ_F_BUFFER_SELECT) {
- size_t len = 1;
-
- buf = io_buffer_select(req, &len, issue_flags);
- if (!buf)
- return -ENOBUFS;
- }
-
- cflags = io_put_kbuf(req, issue_flags);
- __io_req_complete(req, issue_flags, 0, cflags);
+ __io_req_complete(req, issue_flags, 0, 0);
return 0;
}