Skip to content

Commit 69cf397

Browse files
committed
afs: Fix to actually set AFS_SERVER_FL_HAVE_EPOCH
AFS keeps track of the epoch value from the rxrpc protocol to note (a) when a fileserver appears to have restarted and (b) when different endpoints of a fileserver do not appear to be associated with the same fileserver (ie. all probes back from a fileserver from all of its interfaces should carry the same epoch). However, the AFS_SERVER_FL_HAVE_EPOCH flag that indicates that we've received the server's epoch is never set, though it is used. Fix this to set the flag when we first receive an epoch value from a probe sent to the filesystem client from the fileserver. Fixes: 3bf0fb6 ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells <[email protected]>
1 parent be59167 commit 69cf397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/afs/cmservice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int afs_record_cm_probe(struct afs_call *call, struct afs_server *server)
169169

170170
spin_lock(&server->probe_lock);
171171

172-
if (!test_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) {
172+
if (!test_and_set_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) {
173173
server->cm_epoch = call->epoch;
174174
server->probe.cm_epoch = call->epoch;
175175
goto out;

0 commit comments

Comments
 (0)