tctx setup cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | io_uring/tctx: have io_uring_alloc_task_context() return tctxio_uring/ io_uring/ io_uring/ | +19 | 0 replies | |
| 2/2 | io_uring/tctx: clean up __io_uring_add_tctx_node() error handlingio_uring/ | +40 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCHSET for-next 0/2] tctx setup cleanups
Hi,
It's a bit annoying how io_uring_alloc_task_context() automatically assigns tsk->io_uring, when callers later may have paths that fail. This is fine because task cleanup deals with whatever state that ->io_uring may be in, but it would be cleaner to have it either be assigned if it's fully setup, or not assigned at all. These 2 patches do that by having io_uring_alloc_task_context() return the context rather than implicitly assigning it inside the task being passed. The caller must instead assign it to the task, when any operation that can fail has been completed.
No functional changes intended in this series, strictly a cleanup
io_uring/sqpoll.c | 8 ++++- io_uring/tctx.c | 77 +++++++++++++++++++++++++++++------------------ io_uring/tctx.h | 4 +-- 3 files changed, 57 insertions(+), 32 deletions(-)
Signature · 1 line
Jens Axboe