Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: move nop into its own file

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+32 -15
+1 -1
io_uring/Makefile
··· 2 2 # 3 3 # Makefile for io_uring 4 4 5 - obj-$(CONFIG_IO_URING) += io_uring.o xattr.o 5 + obj-$(CONFIG_IO_URING) += io_uring.o xattr.o nop.o 6 6 obj-$(CONFIG_IO_WQ) += io-wq.o
+1 -14
io_uring/io_uring.c
··· 93 93 #include "io_uring.h" 94 94 95 95 #include "xattr.h" 96 + #include "nop.h" 96 97 97 98 #define IORING_MAX_ENTRIES 32768 98 99 #define IORING_MAX_CQ_ENTRIES (2 * IORING_MAX_ENTRIES) ··· 4296 4295 if (ret != sp->len) 4297 4296 req_set_fail(req); 4298 4297 io_req_set_res(req, ret, 0); 4299 - return IOU_OK; 4300 - } 4301 - 4302 - static int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) 4303 - { 4304 - return 0; 4305 - } 4306 - 4307 - /* 4308 - * IORING_OP_NOP just posts a completion event, nothing else. 4309 - */ 4310 - static int io_nop(struct io_kiocb *req, unsigned int issue_flags) 4311 - { 4312 - io_req_set_res(req, 0, 0); 4313 4298 return IOU_OK; 4314 4299 } 4315 4300
+26
io_uring/nop.c
··· 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_types.h" 11 + #include "io_uring.h" 12 + #include "nop.h" 13 + 14 + int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) 15 + { 16 + return 0; 17 + } 18 + 19 + /* 20 + * IORING_OP_NOP just posts a completion event, nothing else. 21 + */ 22 + int io_nop(struct io_kiocb *req, unsigned int issue_flags) 23 + { 24 + io_req_set_res(req, 0, 0); 25 + return IOU_OK; 26 + }
+4
io_uring/nop.h
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 4 + int io_nop(struct io_kiocb *req, unsigned int issue_flags);