]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/svcsock.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / net / sunrpc / svcsock.c
index 30ec3efc48a654fe16e7f7f096b42e4e44727b72..d68eba481291fd1bb1467c0c526e7f3e0e445b49 100644 (file)
@@ -548,9 +548,6 @@ svc_write_space(struct sock *sk)
 /*
  * Receive a datagram from a UDP socket.
  */
-extern int
-csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb);
-
 static int
 svc_udp_recvfrom(struct svc_rqst *rqstp)
 {
@@ -587,7 +584,7 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
                struct timeval tv;
 
                tv.tv_sec = xtime.tv_sec;
-               tv.tv_usec = xtime.tv_nsec * 1000;
+               tv.tv_usec = xtime.tv_nsec / NSEC_PER_USEC;
                skb_set_timestamp(skb, &tv);
                /* Don't enable netstamp, sunrpc doesn't 
                   need that much accuracy */
@@ -626,12 +623,9 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
                /* we can use it in-place */
                rqstp->rq_arg.head[0].iov_base = skb->data + sizeof(struct udphdr);
                rqstp->rq_arg.head[0].iov_len = len;
-               if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
-                       if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
-                               skb_free_datagram(svsk->sk_sk, skb);
-                               return 0;
-                       }
-                       skb->ip_summed = CHECKSUM_UNNECESSARY;
+               if (skb_checksum_complete(skb)) {
+                       skb_free_datagram(svsk->sk_sk, skb);
+                       return 0;
                }
                rqstp->rq_skbuff = skb;
        }
@@ -764,7 +758,7 @@ svc_tcp_accept(struct svc_sock *svsk)
        struct svc_serv *serv = svsk->sk_server;
        struct socket   *sock = svsk->sk_sock;
        struct socket   *newsock;
-       struct proto_ops *ops;
+       const struct proto_ops *ops;
        struct svc_sock *newsvsk;
        int             err, slen;
 
@@ -1184,6 +1178,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
        arg->tail[0].iov_len = 0;
 
        try_to_freeze();
+       cond_resched();
        if (signalled())
                return -EINTR;