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: v4.16.17~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f8735f7e492ff288b1c9d57c27434badfa304f2;p=thirdparty%2Fkernel%2Fstable.git afs: Fix server rotation's handling of fileserver probe failure [ Upstream commit ec5a3b4b507efca903d848518dcf2ebf7b04b466 ] 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index 574d96099bcf5..8a444bf7e1671 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)