Skip to content
Snippets Groups Projects
Commit 52442f9b authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Trond Myklebust
Browse files

NFS4: Avoid migration loops


If a server returns itself as a location while migrating, the client may
end up getting stuck attempting to migrate twice to the same server.  Catch
this by checking if the nfs_client found is the same as the existing
client.  For the other two callers to nfs4_set_client, the nfs_client will
always be ERR_PTR(-EINVAL).

Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 3dc14735
Branches
Tags
No related merge requests found
...@@ -817,6 +817,11 @@ static int nfs4_set_client(struct nfs_server *server, ...@@ -817,6 +817,11 @@ static int nfs4_set_client(struct nfs_server *server,
goto error; goto error;
} }
if (server->nfs_client == clp) {
error = -ELOOP;
goto error;
}
/* /*
* Query for the lease time on clientid setup or renewal * Query for the lease time on clientid setup or renewal
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment