xref: /openbmc/linux/io_uring/nop.c (revision 82806c25)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/kernel.h>
3 #include <linux/errno.h>
4 #include <linux/fs.h>
5 #include <linux/file.h>
6 #include <linux/io_uring.h>
7 
8 #include <uapi/linux/io_uring.h>
9 
10 #include "io_uring.h"
11 #include "nop.h"
12 
13 int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
14 {
15 	return 0;
16 }
17 
18 /*
19  * IORING_OP_NOP just posts a completion event, nothing else.
20  */
21 int io_nop(struct io_kiocb *req, unsigned int issue_flags)
22 {
23 	io_req_set_res(req, 0, 0);
24 	return IOU_OK;
25 }
26