afs: Fix afs_find_server search loop
authorMarc Dionne <marc.dionne@auristor.com>
Sat, 12 May 2018 00:35:06 +0000 (21:35 -0300)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 May 2018 14:15:18 +0000 (15:15 +0100)
commitf9c1bba3d392843f046d2ee27b4dfcec989d8a4b
tree84f32ead390f4147fb7b835131a42bb24161374c
parenta86b06d1ccd218a6a50d6a3a88fbd2abcd0eaa94
afs: Fix afs_find_server search loop

The code that looks up servers by addresses makes the assumption
that the list of addresses for a server is sorted.  It exits the
loop if it finds that the target address is larger than the
current candidate.  As the list is not currently sorted, this
can lead to a failure to find a matching server, which can cause
callbacks from that server to be ignored.

Remove the early exit case so that the complete list is searched.

Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/server.c