]> err.no Git - linux-2.6/blobdiff - net/sunrpc/svcsock.c
[TCP]: Fix off by one in tcp_fragment() "already sent" test.
[linux-2.6] / net / sunrpc / svcsock.c
index 05907035bc96105d67fe124eef6793647b696d43..05fe2e735538e15999a5b018f19b5c8474573dc7 100644 (file)
@@ -34,7 +34,7 @@
 #include <net/sock.h>
 #include <net/checksum.h>
 #include <net/ip.h>
-#include <net/tcp.h>
+#include <net/tcp_states.h>
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
@@ -584,13 +584,16 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
                /* possibly an icmp error */
                dprintk("svc: recvfrom returned error %d\n", -err);
        }
-       if (skb->stamp.tv_sec == 0) {
-               skb->stamp.tv_sec = xtime.tv_sec; 
-               skb->stamp.tv_usec = xtime.tv_nsec * 1000; 
+       if (skb->tstamp.off_sec == 0) {
+               struct timeval tv;
+
+               tv.tv_sec = xtime.tv_sec;
+               tv.tv_usec = xtime.tv_nsec * 1000;
+               skb_set_timestamp(skb, &tv);
                /* Don't enable netstamp, sunrpc doesn't 
                   need that much accuracy */
        }
-       svsk->sk_sk->sk_stamp = skb->stamp;
+       skb_get_timestamp(skb, &svsk->sk_sk->sk_stamp);
        set_bit(SK_DATA, &svsk->sk_flags); /* there may be more data... */
 
        /*
@@ -1185,8 +1188,8 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
        arg->page_len = (pages-2)*PAGE_SIZE;
        arg->len = (pages-1)*PAGE_SIZE;
        arg->tail[0].iov_len = 0;
-       
-       try_to_freeze(PF_FREEZE);
+
+       try_to_freeze();
        if (signalled())
                return -EINTR;
 
@@ -1227,7 +1230,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
 
                schedule_timeout(timeout);
 
-               try_to_freeze(PF_FREEZE);
+               try_to_freeze();
 
                spin_lock_bh(&serv->sv_lock);
                remove_wait_queue(&rqstp->rq_wait, &wait);