From: David Howells Date: Thu, 10 May 2018 13:22:38 +0000 (+0100) Subject: afs: Fix server rotation's handling of fileserver probe failure X-Git-Tag: Ubuntu-5.13.0-19.19~11033^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ec5a3b4b507efca903d848518dcf2ebf7b04b466;p=mirror_ubuntu-jammy-kernel.git afs: Fix server rotation's handling of fileserver probe failure The server rotation algorithm just gives up if it fails to probe a fileserver. Fix this by rotating to the next fileserver instead. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells --- diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index 4a26d51b2968..84584dcced72 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -369,8 +369,16 @@ use_server: if (!test_bit(AFS_SERVER_FL_PROBED, &server->flags)) { fc->ac.alist = afs_get_addrlist(alist); - if (!afs_probe_fileserver(fc)) - goto failed; + if (!afs_probe_fileserver(fc)) { + switch (fc->ac.error) { + case -ENOMEM: + case -ERESTARTSYS: + case -EINTR: + goto failed; + default: + goto next_server; + } + } } if (!fc->ac.alist)