Skip to content

Commit 6a8118a

Browse files
committed
io_uring/futex: get rid of struct io_futex addr union
Rather than use a union of a u32 and struct futex_waitv user address, consolidate it into a single void __user pointer instead. This also makes prep easier to use as the store happens to the member that will be used. No functional changes in this patch. Signed-off-by: Jens Axboe <[email protected]>
1 parent 607d09d commit 6a8118a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

io_uring/futex.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
struct io_futex {
1616
struct file *file;
17-
union {
18-
u32 __user *uaddr;
19-
struct futex_waitv __user *uwaitv;
20-
};
17+
void __user *uaddr;
2118
unsigned long futex_val;
2219
unsigned long futex_mask;
2320
unsigned long futexv_owned;
@@ -186,7 +183,7 @@ int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
186183
if (!futexv)
187184
return -ENOMEM;
188185

189-
ret = futex_parse_waitv(futexv, iof->uwaitv, iof->futex_nr,
186+
ret = futex_parse_waitv(futexv, iof->uaddr, iof->futex_nr,
190187
io_futex_wakev_fn, req);
191188
if (ret) {
192189
kfree(futexv);

0 commit comments

Comments
 (0)