int wspace;
if (svsk->sk_sock->type == SOCK_STREAM)
- wspace = tcp_wspace(svsk->sk_sk);
+ wspace = sk_stream_wspace(svsk->sk_sk);
else
wspace = sock_wspace(svsk->sk_sk);
}
/* send tail */
if (xdr->tail[0].iov_len) {
- /* The tail *will* be in respages[0]; */
result = sock->ops->sendpage(sock, rqstp->rq_respages[rqstp->rq_restailpage],
((unsigned long)xdr->tail[0].iov_base)& (PAGE_SIZE-1),
xdr->tail[0].iov_len, 0);
* Generic recvfrom routine.
*/
static int
-svc_recvfrom(struct svc_rqst *rqstp, struct iovec *iov, int nr, int buflen)
+svc_recvfrom(struct svc_rqst *rqstp, struct kvec *iov, int nr, int buflen)
{
- mm_segment_t oldfs;
struct msghdr msg;
struct socket *sock;
int len, alen;
msg.msg_name = &rqstp->rq_addr;
msg.msg_namelen = sizeof(rqstp->rq_addr);
- msg.msg_iov = iov;
- msg.msg_iovlen = nr;
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = MSG_DONTWAIT;
- oldfs = get_fs(); set_fs(KERNEL_DS);
- len = sock_recvmsg(sock, &msg, buflen, MSG_DONTWAIT);
- set_fs(oldfs);
+ len = kernel_recvmsg(sock, &msg, iov, nr, buflen, MSG_DONTWAIT);
/* sock_recvmsg doesn't fill in the name/namelen, so we must..
* possibly we should cache this in the svc_sock structure
struct svc_sock *svsk = rqstp->rq_sock;
struct svc_serv *serv = svsk->sk_server;
int len;
- struct iovec vec[RPCSVC_MAXPAGES];
+ struct kvec vec[RPCSVC_MAXPAGES];
int pnum, vlen;
dprintk("svc: tcp_recv %p data %d conn %d close %d\n",
*/
if (svsk->sk_tcplen < 4) {
unsigned long want = 4 - svsk->sk_tcplen;
- struct iovec iov;
+ struct kvec iov;
iov.iov_base = ((char *) &svsk->sk_reclen) + svsk->sk_tcplen;
iov.iov_len = want;
rqstp->rq_arg.page_len = len - rqstp->rq_arg.head[0].iov_len;
}
- rqstp->rq_skbuff = 0;
+ rqstp->rq_skbuff = NULL;
rqstp->rq_prot = IPPROTO_TCP;
/* Reset TCP read info */
int sent;
u32 reclen;
- /* Set up the first element of the reply iovec.
- * Any other iovecs that may be in use have been taken
+ /* Set up the first element of the reply kvec.
+ * Any other kvecs that may be in use have been taken
* care of by the server implementation itself.
*/
reclen = htonl(0x80000000|((xbufp->len ) - 4));