Pull io_uring updates from Jens Axboe: "Mostly just come fixes and cleanups, but one feature as well. In detail: - Harden the check for handling IOPOLL based on return (Pavel) - Various minor optimizations (Pavel) - Drop remnants of SCM_RIGHTS fd passing support, now that it's no longer supported since 6.7 (me) - Fix for a case where bytes_done wasn't initialized properly on a failure condition for read/write requests (me) - Move the register related code to a separate file (me) - Add support for returning the provided ring buffer head (me) - Add support for adding a direct descriptor to the normal file table (me, Christian Brauner) - Fix for ensuring pending task_work for a ring with DEFER_TASKRUN is run even if we timeout waiting (me)" * tag 'for-6.8/io_uring-2024-01-08' of git://git.kernel.dk/linux: io_uring: ensure local task_work is run on wait timeout io_uring/kbuf: add method for returning provided buffer ring head io_uring/rw: ensure io->bytes_done is always initialized io_uring: drop any code related to SCM_RIGHTS io_uring/unix: drop usage of io_uring socket io_uring/register: move io_uring_register(2) related code to register.c io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL io_uring/cmd: inline io_uring_cmd_get_task io_uring/cmd: inline io_uring_cmd_do_in_task_lazy io_uring: split out cmd api into a separate header io_uring: optimise ltimeout for inline execution io_uring: don't check iopoll if request completes
Showing the changes to io_uring/uring_cmd.c (1 of 26 files). Show all
Unified · Split
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #include <linux/kernel.h> |
| 3 | 3 | #include <linux/errno.h> |
| 4 | 4 | #include <linux/file.h> |
| 5 | −#include <linux/io_uring.h> | |
| 5 | +#include <linux/io_uring/cmd.h> | |
| 6 | 6 | #include <linux/security.h> |
| 7 | 7 | #include <linux/nospec.h> |
| 8 | 8 | |
| @@ -52,12 +52,6 @@ void io_uring_cmd_mark_cancelable(struct io_uring_cmd *cmd, · 43 unmodified lines | ||
| 52 | 52 | } |
| 53 | 53 | EXPORT_SYMBOL_GPL(io_uring_cmd_mark_cancelable); |
| 54 | 54 | |
| 55 | −struct task_struct *io_uring_cmd_get_task(struct io_uring_cmd *cmd) | |
| 56 | −{ | |
| 57 | − return cmd_to_io_kiocb(cmd)->task; | |
| 58 | −} | |
| 59 | −EXPORT_SYMBOL_GPL(io_uring_cmd_get_task); | |
| 60 | − | |
| 61 | 55 | static void io_uring_cmd_work(struct io_kiocb *req, struct io_tw_state *ts) |
| 62 | 56 | { |
| 63 | 57 | struct io_uring_cmd *ioucmd = io_kiocb_to_cmd(req, struct io_uring_cmd); |
| @@ -78,13 +72,6 @@ void __io_uring_cmd_do_in_task(struct io_uring_cmd *ioucmd, · 14 unmodified lines | ||
| 78 | 72 | } |
| 79 | 73 | EXPORT_SYMBOL_GPL(__io_uring_cmd_do_in_task); |
| 80 | 74 | |
| 81 | −void io_uring_cmd_do_in_task_lazy(struct io_uring_cmd *ioucmd, | |
| 82 | − void (*task_work_cb)(struct io_uring_cmd *, unsigned)) | |
| 83 | −{ | |
| 84 | − __io_uring_cmd_do_in_task(ioucmd, task_work_cb, IOU_F_TWQ_LAZY_WAKE); | |
| 85 | −} | |
| 86 | −EXPORT_SYMBOL_GPL(io_uring_cmd_do_in_task_lazy); | |
| 87 | − | |
| 88 | 75 | static inline void io_req_set_cqe32_extra(struct io_kiocb *req, |
| 89 | 76 | u64 extra1, u64 extra2) |
| 90 | 77 | { |