Commit 6a8118a7 authored by Jens Axboe's avatar Jens Axboe
Browse files

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: default avatarJens Axboe <axboe@kernel.dk>
parent 607d09d1
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -14,10 +14,7 @@

struct io_futex {
	struct file	*file;
	union {
		u32 __user			*uaddr;
		struct futex_waitv __user	*uwaitv;
	};
	void __user	*uaddr;
	unsigned long	futex_val;
	unsigned long	futex_mask;
	unsigned long	futexv_owned;
@@ -186,7 +183,7 @@ int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
	if (!futexv)
		return -ENOMEM;

	ret = futex_parse_waitv(futexv, iof->uwaitv, iof->futex_nr,
	ret = futex_parse_waitv(futexv, iof->uaddr, iof->futex_nr,
				io_futex_wakev_fn, req);
	if (ret) {
		kfree(futexv);