• Home
  • Raw
  • Download

Lines Matching refs:iocb

117 static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
119 static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
647 static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock, in __sock_sendmsg_nosec() argument
650 struct sock_iocb *si = kiocb_to_siocb(iocb); in __sock_sendmsg_nosec()
657 return sock->ops->sendmsg(iocb, sock, msg, size); in __sock_sendmsg_nosec()
660 static inline int __sock_sendmsg(struct kiocb *iocb, struct socket *sock, in __sock_sendmsg() argument
665 return err ?: __sock_sendmsg_nosec(iocb, sock, msg, size); in __sock_sendmsg()
670 struct kiocb iocb; in sock_sendmsg() local
674 init_sync_kiocb(&iocb, NULL); in sock_sendmsg()
675 iocb.private = &siocb; in sock_sendmsg()
676 ret = __sock_sendmsg(&iocb, sock, msg, size); in sock_sendmsg()
678 ret = wait_on_sync_kiocb(&iocb); in sock_sendmsg()
685 struct kiocb iocb; in sock_sendmsg_nosec() local
689 init_sync_kiocb(&iocb, NULL); in sock_sendmsg_nosec()
690 iocb.private = &siocb; in sock_sendmsg_nosec()
691 ret = __sock_sendmsg_nosec(&iocb, sock, msg, size); in sock_sendmsg_nosec()
693 ret = wait_on_sync_kiocb(&iocb); in sock_sendmsg_nosec()
793 static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, in __sock_recvmsg_nosec() argument
796 struct sock_iocb *si = kiocb_to_siocb(iocb); in __sock_recvmsg_nosec()
804 return sock->ops->recvmsg(iocb, sock, msg, size, flags); in __sock_recvmsg_nosec()
807 static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock, in __sock_recvmsg() argument
812 return err ?: __sock_recvmsg_nosec(iocb, sock, msg, size, flags); in __sock_recvmsg()
818 struct kiocb iocb; in sock_recvmsg() local
822 init_sync_kiocb(&iocb, NULL); in sock_recvmsg()
823 iocb.private = &siocb; in sock_recvmsg()
824 ret = __sock_recvmsg(&iocb, sock, msg, size, flags); in sock_recvmsg()
826 ret = wait_on_sync_kiocb(&iocb); in sock_recvmsg()
834 struct kiocb iocb; in sock_recvmsg_nosec() local
838 init_sync_kiocb(&iocb, NULL); in sock_recvmsg_nosec()
839 iocb.private = &siocb; in sock_recvmsg_nosec()
840 ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags); in sock_recvmsg_nosec()
842 ret = wait_on_sync_kiocb(&iocb); in sock_recvmsg_nosec()
906 static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb, in alloc_sock_iocb() argument
909 siocb->kiocb = iocb; in alloc_sock_iocb()
910 iocb->private = siocb; in alloc_sock_iocb()
914 static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb, in do_sock_read() argument
933 return __sock_recvmsg(iocb, sock, msg, size, msg->msg_flags); in do_sock_read()
936 static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, in sock_aio_read() argument
944 if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */ in sock_aio_read()
948 x = alloc_sock_iocb(iocb, &siocb); in sock_aio_read()
951 return do_sock_read(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs); in sock_aio_read()
954 static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb, in do_sock_write() argument
975 return __sock_sendmsg(iocb, sock, msg, size); in do_sock_write()
978 static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, in sock_aio_write() argument
986 x = alloc_sock_iocb(iocb, &siocb); in sock_aio_write()
990 return do_sock_write(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs); in sock_aio_write()