/* Find a client by IP address and protocol version */
struct nfs_client* nfs_find_client_next(struct nfs_client *clp)
/* Find a client by IP address and protocol version */
struct nfs_client* nfs_find_client_next(struct nfs_client *clp)
{
	struct sockaddr *sap = (struct sockaddr *)&clp->cl_addr;
	u32 nfsvers = clp->rpc_ops->version;
	spin_lock(&nfs_client_lock);
	list_for_each_entry_continue(clp, &nfs_client_list, cl_share_link) {
		struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr;
		if (clp->cl_cons_state != NFS_CS_READY)
			continue;
		if (clp->rpc_ops->version != nfsvers)
			continue;
		if (!nfs_sockaddr_match_ipaddr(sap, clap))
			continue;
		atomic_inc(&clp->cl_count);
		spin_unlock(&nfs_client_lock);
		return clp;
	}
	spin_unlock(&nfs_client_lock);
	return NULL;
}