]> git.itanic.dy.fi Git - linux-stable/commitdiff
rxrpc: Fix calc of resend age
authorDavid Howells <dhowells@redhat.com>
Tue, 5 Apr 2022 12:34:09 +0000 (13:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:16:59 +0000 (14:16 +0200)
[ Upstream commit 214a9dc7d852216e83acac7b75bc18f01ce184c2 ]

Fix the calculation of the resend age to add a microsecond value as
microseconds, not nanoseconds.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rxrpc/call_event.c

index f8ecad2b730e8850cc1235cd72362c22cd7f6192..2a93e7b5fbd0514facd5ebc56194b2a343be4152 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);