]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix giving up callbacks on server destruction
authorDavid Howells <dhowells@redhat.com>
Thu, 10 May 2018 13:12:50 +0000 (14:12 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 May 2018 12:17:35 +0000 (13:17 +0100)
commite74477efd986e7a13ac3d4af062910013fca6df3
treeb0191fde2c4c0f7aaf2b35354a58c6c2bb0e0c3f
parent24183facff307848e730f461adabae6243487ef6
afs: Fix giving up callbacks on server destruction

When a server record is destroyed, we want to send a message to the server
telling it that we're giving up all the callbacks it has promised us.

Apply two fixes to this:

 (1) Only send the FS.GiveUpAllCallBacks message if we actually got a
     callback from that server.  We assume this to be the case if we
     performed at least one successful FS operation on that server.

 (2) Send it to the address last used for that server rather than always
     picking the first address in the list (which might be unreachable).

Fixes: 4ead43a3559d ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/internal.h
fs/afs/rxrpc.c
fs/afs/server.c