mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
Revert "io_uring: add buffer selection support to IORING_OP_NOP"
This reverts commit 3d200242a6
.
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>
This commit is contained in:
parent
8899ce4b2f
commit
aa165d6d2b
@ -1114,7 +1114,6 @@ static const struct io_op_def io_op_defs[] = {
|
|||||||
[IORING_OP_NOP] = {
|
[IORING_OP_NOP] = {
|
||||||
.audit_skip = 1,
|
.audit_skip = 1,
|
||||||
.iopoll = 1,
|
.iopoll = 1,
|
||||||
.buffer_select = 1,
|
|
||||||
},
|
},
|
||||||
[IORING_OP_READV] = {
|
[IORING_OP_READV] = {
|
||||||
.needs_file = 1,
|
.needs_file = 1,
|
||||||
@ -5269,19 +5268,7 @@ static int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
|||||||
*/
|
*/
|
||||||
static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
|
static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
|
||||||
{
|
{
|
||||||
unsigned int cflags;
|
__io_req_complete(req, issue_flags, 0, 0);
|
||||||
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);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user