Commit 3501466941347f0e1992b2672affb3feb92925fd
1 parent
00dd1e4339
Exists in
master
and in
7 other branches
[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 <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
net/sunrpc/svcsock.c
... | ... | @@ -586,7 +586,7 @@ |
586 | 586 | } |
587 | 587 | if (skb->stamp.tv_sec == 0) { |
588 | 588 | skb->stamp.tv_sec = xtime.tv_sec; |
589 | - skb->stamp.tv_usec = xtime.tv_nsec * 1000; | |
589 | + skb->stamp.tv_usec = xtime.tv_nsec / NSEC_PER_USEC; | |
590 | 590 | /* Don't enable netstamp, sunrpc doesn't |
591 | 591 | need that much accuracy */ |
592 | 592 | } |