OSDN Git Service

rxrpc: Fix calc of resend age
authorDavid Howells <dhowells@redhat.com>
Tue, 5 Apr 2022 12:34:09 +0000 (13:34 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 1 Sep 2022 10:44:12 +0000 (11:44 +0100)
Fix the calculation of the resend age to add a microsecond value as
microseconds, not nanoseconds.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_event.c

index f8ecad2..2a93e7b 100644 (file)
@@ -166,7 +166,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
        _enter("{%d,%d}", call->tx_hard_ack, call->tx_top);
 
        now = ktime_get_real();
-       max_age = ktime_sub(now, jiffies_to_usecs(call->peer->rto_j));
+       max_age = ktime_sub_us(now, jiffies_to_usecs(call->peer->rto_j));
 
        spin_lock_bh(&call->lock);