Lines Matching refs:iof

65 	struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);  in io_futexv_complete()  local
70 if (!iof->futexv_unqueued) { in io_futexv_complete()
73 res = futex_unqueue_multiple(futexv, iof->futex_nr); in io_futexv_complete()
83 static bool io_futexv_claim(struct io_futex *iof) in io_futexv_claim() argument
85 if (test_bit(0, &iof->futexv_owned) || in io_futexv_claim()
86 test_and_set_bit_lock(0, &iof->futexv_owned)) in io_futexv_claim()
101 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in __io_futex_cancel() local
103 if (!io_futexv_claim(iof)) in __io_futex_cancel()
128 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futex_prep() local
135 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_futex_prep()
136 iof->futex_val = READ_ONCE(sqe->addr2); in io_futex_prep()
137 iof->futex_mask = READ_ONCE(sqe->addr3); in io_futex_prep()
143 iof->futex_flags = futex2_to_flags(flags); in io_futex_prep()
144 if (!futex_flags_valid(iof->futex_flags)) in io_futex_prep()
147 if (!futex_validate_input(iof->futex_flags, iof->futex_val) || in io_futex_prep()
148 !futex_validate_input(iof->futex_flags, iof->futex_mask)) in io_futex_prep()
157 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futex_wakev_fn() local
159 if (!io_futexv_claim(iof)) in io_futex_wakev_fn()
171 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futexv_prep() local
180 iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_futexv_prep()
181 iof->futex_nr = READ_ONCE(sqe->len); in io_futexv_prep()
182 if (!iof->futex_nr || iof->futex_nr > FUTEX_WAITV_MAX) in io_futexv_prep()
185 futexv = kcalloc(iof->futex_nr, sizeof(*futexv), GFP_KERNEL); in io_futexv_prep()
189 ret = futex_parse_waitv(futexv, iof->uwaitv, iof->futex_nr, in io_futexv_prep()
196 iof->futexv_owned = 0; in io_futexv_prep()
197 iof->futexv_unqueued = 0; in io_futexv_prep()
218 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futexv_wait() local
225 ret = futex_wait_multiple_setup(futexv, iof->futex_nr, &woken); in io_futexv_wait()
262 iof->futexv_unqueued = 1; in io_futexv_wait()
273 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futex_wait() local
279 if (!iof->futex_mask) { in io_futex_wait()
293 ifd->q.bitset = iof->futex_mask; in io_futex_wait()
297 ret = futex_wait_setup(iof->uaddr, iof->futex_val, iof->futex_flags, in io_futex_wait()
319 struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex); in io_futex_wake() local
326 ret = futex_wake(iof->uaddr, FLAGS_STRICT | iof->futex_flags, in io_futex_wake()
327 iof->futex_val, iof->futex_mask); in io_futex_wake()