FreeBSD/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
/*
 * Remove a client from our global lists and free it if we can.
 */
Remove a client from our global lists and free it if we can.
Remove a client from our global lists and free it if we can .
static void
svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client)
{
	struct svc_rpc_gss_client_list *list;
	struct svc_rpc_gss_client *tclient;
	list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE];
	sx_xlock(&svc_rpc_gss_lock);
	TAILQ_FOREACH(tclient, list, cl_link) {
		if (client == tclient) {
			svc_rpc_gss_forget_client_locked(client);
			sx_xunlock(&svc_rpc_gss_lock);
			svc_rpc_gss_release_client(client);
			return;
		}
	}
	sx_xunlock(&svc_rpc_gss_lock);
}
static void svc_rpc_gss_forget_client ( struct svc_rpc_gss_client * client ) { struct svc_rpc_gss_client_list * list ; struct svc_rpc_gss_client * tclient ; list = & svc_rpc_gss_client_hash [ client -> cl_id . ci_id % CLIENT_HASH_SIZE ] ; sx_xlock ( & svc_rpc_gss_lock ) ; TAILQ_FOREACH ( tclient , list , cl_link ) { if ( client == tclient ) { svc_rpc_gss_forget_client_locked ( client ) ; sx_xunlock ( & svc_rpc_gss_lock ) ; svc_rpc_gss_release_client ( client ) ; return ; } } sx_xunlock ( & svc_rpc_gss_lock ) ; }
Remove a client from our global lists and free it if we can.
Remove a client from our global lists and free it if we can .
/*
		 * Make sure this client has not already been removed
		 * from the lists by svc_rpc_gss_forget_client() or
		 * svc_rpc_gss_forget_client_locked().
		 */