[SUNRPC]: Fix nsec --> usec conversion.
authorDavid S. Miller <davem@davemloft.net>
Tue, 9 Aug 2005 21:57:12 +0000 (14:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Aug 2005 21:57:12 +0000 (14:57 -0700)
We need to divide, not multiply.  While we're here,
use NSEC_PER_USEC instead of a magic constant.

Based upon a report from Josip Loncaric and a patch
by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/sunrpc/svcsock.c

index 56db8f13e6cb40c4cf9ecb765923993564c16c7e..d0c3120d0233a43b9089b78c71bed97e627de923 100644 (file)
@@ -586,7 +586,7 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
        }
        if (skb->stamp.tv_sec == 0) {
                skb->stamp.tv_sec = xtime.tv_sec; 
-               skb->stamp.tv_usec = xtime.tv_nsec * 1000
+               skb->stamp.tv_usec = xtime.tv_nsec / NSEC_PER_USEC
                /* Don't enable netstamp, sunrpc doesn't 
                   need that much accuracy */
        }