summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-04-16 18:29:03 +0200
committerPeter Zijlstra <peterz@infradead.org>2025-05-03 12:02:05 +0200
commit93f1b6d79a73b520b6875cf3babf4a09acc4eef0 (patch)
tree524b0fac64a454b1c59c68e7697e2e4e561af592 /io_uring
parent55284f70134f01fdc9cc4c4905551cc1f37abd34 (diff)
futex: Move futex_queue() into futex_wait_setup()
futex_wait_setup() has a weird calling convention in order to return hb to use as an argument to futex_queue(). Mostly such that requeue can have an extra test in between. Reorder code a little to get rid of this and keep the hb usage inside futex_wait_setup(). [bigeasy: fixes] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20250416162921.513656-4-bigeasy@linutronix.de
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/futex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_uring/futex.c b/io_uring/futex.c
index 0ea4820cd8ff..e89c0897117a 100644
--- a/io_uring/futex.c
+++ b/io_uring/futex.c
@@ -273,7 +273,6 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)
struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
struct io_ring_ctx *ctx = req->ctx;
struct io_futex_data *ifd = NULL;
- struct futex_hash_bucket *hb;
int ret;
if (!iof->futex_mask) {
@@ -295,12 +294,11 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)
ifd->req = req;
ret = futex_wait_setup(iof->uaddr, iof->futex_val, iof->futex_flags,
- &ifd->q, &hb);
+ &ifd->q, NULL, NULL);
if (!ret) {
hlist_add_head(&req->hash_node, &ctx->futex_list);
io_ring_submit_unlock(ctx, issue_flags);
- futex_queue(&ifd->q, hb, NULL);
return IOU_ISSUE_SKIP_COMPLETE;
}