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@xxxxxxxxxx> --- fs/nfs/nfs4client.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 8d7d08d4f95f..ec8afc43d849 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -817,6 +817,12 @@ static int nfs4_set_client(struct nfs_server *server, goto error; } + /* This client is already set, is there a migration loop? */ + if (server->nfs_client == clp) { + error = -EEXIST; + goto error; + } + /* * Query for the lease time on clientid setup or renewal * -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html