]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
afs: Fix server rotation's handling of fileserver probe failure
authorDavid Howells <dhowells@redhat.com>
Thu, 10 May 2018 13:22:38 +0000 (14:22 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 May 2018 12:26:44 +0000 (13:26 +0100)
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 <dhowells@redhat.com>
fs/afs/rotate.c

index 4a26d51b296829275c34132e6c34f1cd45c6d6f2..84584dcced72367e4364668e430fdce893a65f7e 100644 (file)
@@ -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)