Lines Matching refs:accept
1617 struct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept); in io_accept_prep() local
1622 accept->addr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_accept_prep()
1623 accept->addr_len = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_accept_prep()
1624 accept->flags = READ_ONCE(sqe->accept_flags); in io_accept_prep()
1625 accept->nofile = rlimit(RLIMIT_NOFILE); in io_accept_prep()
1626 accept->iou_flags = READ_ONCE(sqe->ioprio); in io_accept_prep()
1627 if (accept->iou_flags & ~ACCEPT_FLAGS) in io_accept_prep()
1630 accept->file_slot = READ_ONCE(sqe->file_index); in io_accept_prep()
1631 if (accept->file_slot) { in io_accept_prep()
1632 if (accept->flags & SOCK_CLOEXEC) in io_accept_prep()
1634 if (accept->iou_flags & IORING_ACCEPT_MULTISHOT && in io_accept_prep()
1635 accept->file_slot != IORING_FILE_INDEX_ALLOC) in io_accept_prep()
1638 if (accept->flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) in io_accept_prep()
1640 if (SOCK_NONBLOCK != O_NONBLOCK && (accept->flags & SOCK_NONBLOCK)) in io_accept_prep()
1641 accept->flags = (accept->flags & ~SOCK_NONBLOCK) | O_NONBLOCK; in io_accept_prep()
1642 if (accept->iou_flags & IORING_ACCEPT_MULTISHOT) in io_accept_prep()
1644 if (accept->iou_flags & IORING_ACCEPT_DONTWAIT) in io_accept_prep()
1651 struct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept); in io_accept() local
1653 bool fixed = !!accept->file_slot; in io_accept()
1662 accept->iou_flags & IORING_ACCEPT_POLL_FIRST) in io_accept()
1667 fd = __get_unused_fd_flags(accept->flags, accept->nofile); in io_accept()
1673 file = do_accept(req->file, &arg, accept->addr, accept->addr_len, in io_accept()
1674 accept->flags); in io_accept()
1680 !(accept->iou_flags & IORING_ACCEPT_DONTWAIT)) in io_accept()
1690 accept->file_slot); in io_accept()