浏览代码

[PATCH] svcsock timestamp fix

Convert nanoseconds to microseconds correctly.

Spotted by Steve Dickson <SteveD@redhat.com>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton 19 年之前
父节点
当前提交
4bcde03d41
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sunrpc/svcsock.c

+ 1 - 1
net/sunrpc/svcsock.c

@@ -587,7 +587,7 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
 		struct timeval tv;
 		struct timeval tv;
 
 
 		tv.tv_sec = xtime.tv_sec;
 		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);
 		skb_set_timestamp(skb, &tv);
 		/* Don't enable netstamp, sunrpc doesn't 
 		/* Don't enable netstamp, sunrpc doesn't 
 		   need that much accuracy */
 		   need that much accuracy */