/* Find an nfs_client on the list that matches the initialisation data that is supplied.  */
static struct nfs_client* nfs_match_client(const struct nfs_client_initdata *data)
/* Find an nfs_client on the list that matches the initialisation data that is supplied.  */
static struct nfs_client* nfs_match_client(const struct nfs_client_initdata *data)
{
	struct nfs_client *clp;
	const struct sockaddr *sap = data->addr;
	list_for_each_entry(clp, &nfs_client_list, cl_share_link) {
	        const struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr;
		if (clp->cl_cons_state < 0)
			continue;
		if (clp->rpc_ops != data->rpc_ops)
			continue;
		if (clp->cl_proto != data->proto)
			continue;
		if (clp->cl_minorversion != data->minorversion)
			continue;
		if (!nfs_sockaddr_cmp(sap, clap))
			continue;
		atomic_inc(&clp->cl_count);
		return clp;
	}
	return NULL;
}