From: David Howells Date: Fri, 11 May 2018 21:55:59 +0000 (+0100) Subject: afs: Fix VNOVOL handling in address rotation X-Git-Tag: v4.16.17~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5167bb2a074497fba3a3991f8dcc4f406d46dda4;p=thirdparty%2Fkernel%2Fstable.git afs: Fix VNOVOL handling in address rotation [ Upstream commit 3d9fa91161387ee629e7a07c47934d119910c8ae ] If a volume location record lists multiple file servers for a volume, then it's possible that due to a misconfiguration or a changing configuration that one of the file servers doesn't know about it yet and will abort VNOVOL. Currently, the rotation algorithm will stop with EREMOTEIO. Fix this by moving on to try the next server if VNOVOL is returned. Once all the servers have been tried and the record rechecked, the algorithm will stop with EREMOTEIO or ENOMEDIUM. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Reported-by: Marc Dionne 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 8a444bf7e1671..9caf7410aff31 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -179,7 +179,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc) */ if (fc->flags & AFS_FS_CURSOR_VNOVOL) { fc->ac.error = -EREMOTEIO; - goto failed; + goto next_server; } write_lock(&vnode->volume->servers_lock); @@ -201,7 +201,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc) */ if (vnode->volume->servers == fc->server_list) { fc->ac.error = -EREMOTEIO; - goto failed; + goto next_server; } /* Try again */