From: David S. Miller Date: Tue, 9 Aug 2005 21:57:12 +0000 (-0700) Subject: [SUNRPC]: Fix nsec --> usec conversion. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3501466941347f0e1992b2672affb3feb92925fd;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [SUNRPC]: Fix nsec --> usec conversion. 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 --- diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 56db8f13e6c..d0c3120d023 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -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 */ }