]> 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>
Wed, 28 Sep 2022 09:03:58 +0000 (11:03 +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 8574e7066d94cd249b31e8100bec5943d2d2f178..b5f173960725b8a55c46d39dbf3d2eda526f7b00 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);