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: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
Benjamin Coddington 2016-08-30 09:20:32 -04:00 коммит произвёл Trond Myklebust
Родитель 3dc147359e
Коммит 52442f9b11
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -817,6 +817,11 @@ static int nfs4_set_client(struct nfs_server *server,
goto error;
}
if (server->nfs_client == clp) {
error = -ELOOP;
goto error;
}
/*
* Query for the lease time on clientid setup or renewal
*