summaryrefslogtreecommitdiffstats
path: root/fs/afs/vl_probe.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-08-20 16:13:00 +0200
committerDavid Howells <dhowells@redhat.com>2020-08-20 19:21:28 +0200
commit1d4adfaf65746203861c72d9d78de349eb97d528 (patch)
tree324c9592cfe0c5c63a2fb2d29d74db421cab1a88 /fs/afs/vl_probe.c
parentrxrpc: Fix loss of RTT samples due to interposed ACK (diff)
downloadlinux-1d4adfaf65746203861c72d9d78de349eb97d528.tar.xz
linux-1d4adfaf65746203861c72d9d78de349eb97d528.zip
rxrpc: Make rxrpc_kernel_get_srtt() indicate validity
Fix rxrpc_kernel_get_srtt() to indicate the validity of the returned smoothed RTT. If we haven't had any valid samples yet, the SRTT isn't useful. Fixes: c410bf01933e ("rxrpc: Fix the excessive initial retransmission timeout") Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/vl_probe.c')
-rw-r--r--fs/afs/vl_probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/vl_probe.c b/fs/afs/vl_probe.c
index e3aa013c2177..081b7e5b13f5 100644
--- a/fs/afs/vl_probe.c
+++ b/fs/afs/vl_probe.c
@@ -92,8 +92,8 @@ responded:
}
}
- rtt_us = rxrpc_kernel_get_srtt(call->net->socket, call->rxcall);
- if (rtt_us < server->probe.rtt) {
+ if (rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us) &&
+ rtt_us < server->probe.rtt) {
server->probe.rtt = rtt_us;
alist->preferred = index;
have_result = true;