[NET]: move struct proto_ops to const
[pandora-kernel.git] / net / sunrpc / svcsock.c
index 130f2b5..d68eba4 100644 (file)
@@ -584,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 */
@@ -623,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;
        }
@@ -761,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;
 
@@ -1181,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;