From f3c130e6e6d15822e1553531f91ecc8f3375bac3 Mon Sep 17 00:00:00 2001 From: David Howells Date: Sat, 2 May 2020 13:39:57 +0100 Subject: afs: Don't use probe running state to make decisions outside probe code Don't use the running state for fileserver probes to make decisions about which server to use as the state is cleared at the start of a probe and also intermediate values might be misleading. Instead, add a separate 'latest known' rtt in the afs_server struct and a flag to indicate if the server is known to be responding and update these as and when we know what to change them to. Signed-off-by: David Howells --- fs/afs/server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/afs/server.c') diff --git a/fs/afs/server.c b/fs/afs/server.c index 88593ffcb54e..039e3488511c 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c @@ -239,6 +239,7 @@ static struct afs_server *afs_alloc_server(struct afs_cell *cell, INIT_LIST_HEAD(&server->probe_link); spin_lock_init(&server->probe_lock); server->cell = cell; + server->rtt = UINT_MAX; afs_inc_servers_outstanding(net); trace_afs_server(server, 1, 1, afs_server_trace_alloc); -- cgit