projects/linux·commit 4bcde03d

[PATCH] svcsock timestamp fix

4bcde03d · Andrew Morton <[email protected]> · 2005-10-26 01:59:03 -07:00

Convert nanoseconds to microseconds correctly.

Spotted by Steve Dickson <[email protected]>

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
4bcde03d41d2264edb4ea3c47cb27da1e2609e48
Parents
94c1d318

Changes

1 files changed · +1 −1

FileStatusAddDelContent
net/sunrpc/svcsock.cmodified+1−1View file

net/sunrpc/svcsock.c

View file
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 30ec3ef..691dea4 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -587,7 +587,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 */