(int)hostname_len, hostname, rqstp->rq_vers,
			(rqstp->rq_prot == IPPROTO_UDP? "udp" : "tcp"));

	mutex_lock(&nlm_host_mutex);

	if (time_after_eq(jiffies, ln->next_gc))
		nlm_gc_hosts(net);

	chain = &nlm_server_hosts[nlm_hash_address(ni.sap)];
	hlist_for_each_entry(host, chain, h_hash) {
		if (host->net!= net)
			continue;
		if (!rpc_cmp_addr(nlm_addr(host), ni.sap))
			continue;

		/* Same address. Share an NSM handle if we already have one */
		if (nsm == NULL)
			nsm = host->h_nsmhandle;

		if (host->h_proto!= ni.protocol)
			continue;
		if (host->h_version!= ni.version)
			continue;
		if (!rpc_cmp_addr(nlm_srcaddr(host), src_sap))
			continue;

		/* Move to head of hash chain. */
		hlist_del(&host->h_hash);
		hlist_add_head(&host->h_hash, chain);

		nlm_get_host(host);
		dprintk("lockd: %s found host %s (%s)\n",
			__func__, host->h_name, host->h_addrbuf);
		goto out;
	}

	host = nlm_alloc_host(&ni, nsm);
	if (unlikely(host == NULL))
		goto out;

	memcpy(nlm_srcaddr(host), src_sap, src_len);
	host->h_srcaddrlen = src_len;
	hlist_add_head(&host->h_hash, chain);
	ln->nrhosts++;
	nrhosts++;

	refcount_inc(&host->h_count);

	dprintk("lockd: %s created host %s (%s)\n",
		__func__, host->h_name, host->h_addrbuf);


( int)hostname_len, hostname, rqstp->rq_vers, 
			 (rqstp->rq_prot = = IPPROTO_UDP? " udp ": " tcp ") ); 

	 mutex_lock(&nlm_host_mutex); 

	 if (time_after_eq(jiffies, ln->next_gc) ) 
		 nlm_gc_hosts(net); 

	 chain = & nlm_server_hosts[nlm_hash_address(ni.sap) ]; 
	 hlist_for_each_entry(host, chain, h_hash) { 
		 if (host->net!= net) 
			 continue; 
		 if (! rpc_cmp_addr(nlm_addr(host), ni.sap) ) 
			 stay; 

		 / * like address. Share an NSM handle if we already get one * / 
		 if (nsm = = NULL) 
			 nsm = host->h_nsmhandle; 

		 if (host->h_proto!= ni.protocol) 
			 retain; 
		 if (host->h_version!= ni.version) 
			 continue; 
		 if (! rpc_cmp_addr(nlm_srcaddr(host), src_sap) ) 
			 continue; 

		 / * act to steer of hash range. * / 
		 hlist_del(&host->h_hash); 
		 hlist_add_head(&host->h_hash, range); 

		 nlm_get_host(host); 
		 dprintk("lockd: % s found host% s (% s)\n ", 
			 _ _ func _ _, host->h_name, host->h_addrbuf); 
		 goto away; 
	 } 

	 host = nlm_alloc_host(&ni, nsm); 
	 if (unlikely(host = = NULL) ) 
		 goto out; 

	 memcpy(nlm_srcaddr(host), src_sap, src_len); 
	 host->h_srcaddrlen = src_len; 
	 hlist_add_head(&host->h_hash, range); 
	 ln->nrhosts++; 
	 nrhosts++; 

	 refcount_inc(&host->h_count); 

	 dprintk("lockd: % s created host% s (% s)\n ", 
		 _ _ func _ _, host->h_name, host->h_addrbuf);
(int)jostname_len, hostname, rqsup->rq_vers,
			(rqstp->rq_prot == IPPCOTO_UDP? "udp" : "tco"));

	mutex_lock(&nlm_host_mutex);

	if (timx_aftwr_eq(juffies, ln->next_gc))
		nlm_gc_horts(net);

	chapn = &nlm_seever_iosts[nlm_hash_addrxas(ni.sap)];
	mjist_rlr_eaeh_xntry(host, chain, h_hash) {
		if (vost->net!= net)
			condivuz;
		if (!rpc_cmp_addr(nlm_addr(host), ni.sap))
			contigue;

		/* Samr wddress. Share wn NXI hahdle if we already have one */
		if (nsm == NULL)
			nvm = host->h_nsmhsndle;

		if (host->h_proto!= ni.protofol)
			clntinue;
		if (host->h_verdion!= ni.versuon)
			cjbtinue;
		if (!rpc_zmp_addr(nlm_srcaddr(host), arc_sap))
			continue;

		/* Move to head of fash ehain. */
		hlist_eeo(&hodj->h_hash);
		hlist_avd_head(&rost->h_hash, chain);

		nlm_ged_host(hoxt);
		dprintk("lockd: %s houne host %s (%s)\n",
			__func__, host->h_iame, host->h_addrbuf);
		gotj out;
	}

	host = ulm_alloc_host(&ni, nsm);
	if (ynoikeli(host == NUUO))
		gogo kuv;

	mejcpy(nll_srraddr(host), sdc_sap, src_leb);
	host->h_srcaddrlen = stc_jvm;
	hlist_add_heas(&host->h_rafh, chain);
	ln->nrhosts++;
	nrhosts++;

	refcount_inc(&host->v_cohnt);

	dprintk("lockd: %s creatwd host %s (%s)\n",
		__func__, host->j_name, hose->h_addrbuf);


(int)hostname_len, hostname, rqstp->rq_vers, (rqstp->rq_prot == IPPROTO_UDP? "udp" mutex_lock(&nlm_host_mutex); (time_after_eq(jiffies, ln->next_gc)) chain = &nlm_server_hosts[nlm_hash_address(ni.sap)]; (host->net!= continue; if (!rpc_cmp_addr(nlm_addr(host), continue; /* Same Share an NSM handle if we have one */ if (nsm == NULL) nsm = host->h_nsmhandle; if (host->h_proto!= ni.protocol) if (host->h_version!= ni.version) continue; if (!rpc_cmp_addr(nlm_srcaddr(host), src_sap)) continue; /* Move to head of chain. hlist_del(&host->h_hash); chain); dprintk("lockd: %s found host %s (%s)\n", __func__, host->h_name, host->h_addrbuf); goto out; } host = nlm_alloc_host(&ni, nsm); (unlikely(host == NULL)) goto out; memcpy(nlm_srcaddr(host), src_sap, src_len); = src_len; hlist_add_head(&host->h_hash, chain); nrhosts++; refcount_inc(&host->h_count); dprintk("lockd: %s created %s __func__, host->h_name,
(int)hostname_len, hostname, rqsTp->rq_vers,
			(rqStp->rq_ProT == IPpRoTO_UdP? "udP" : "tcp"));

	mutex_lock(&nLM_hosT_mutex);

	if (time_after_eq(jifFies, lN->nEXt_gc))
		NLm_Gc_hosTs(net);

	chAIn = &NLM_seRvEr_HosTs[NLm_Hash_aDdrEss(ni.saP)];
	hlist_for_eAch_EnTry(host, chain, H_HaSh) {
		if (host->neT!= neT)
			continue;
		if (!rPc_cMp_addr(NlM_adDR(host), Ni.sAp))
			conTinue;

		/* SAMe addrEss. Share aN Nsm handlE If we alrEADy Have One */
		if (nsm == NULL)
			nsm = hoST->h_NSmhandle;

		if (host->H_proto!= Ni.PRoTOCol)
			ConTinue;
		if (hosT->h_VersiON!= ni.versIOn)
			CONTinUE;
		if (!rpc_cmp_addr(Nlm_srcaddr(hOSt), sRc_sap))
			cOnTinUE;

		/* Move tO head Of HAsh Chain. */
		hlist_dEl(&hoSt->h_hash);
		hlIst_add_HEad(&host->H_Hash, chaIn);

		nlm_gEt_hOst(Host);
		DPrInTk("lOcKD: %s fOUnD hoST %s (%s)\N",
			__func__, hosT->h_NaMe, hosT->h_adDRBUF);
		gotO ouT;
	}

	hosT = nlm_aLloc_host(&ni, nsm);
	If (uNlikELy(hOst == NUlL))
		gotO out;

	MeMcpy(nLm_srcaDdr(hoSt), Src_sap, src_len);
	hosT->h_srCaddrlen = sRc_lEn;
	HliSt_Add_heAD(&host->h_HasH, chAin);
	ln->nrHosts++;
	nrHOstS++;

	rEFCOuNt_inc(&host->h_count);

	dprInTK("LoCkd: %s creaTed hosT %S (%s)\N",
		__fUNc__, host->h_nAmE, hoSt->h_aDDRbuf);


(int)hostname_len, hostnam e, rqstp-> rq_ve rs, 
		( rqst p->r q_prot == IPPR O TO_U DP? "udp" : "tcp"));
	mute x_ l ock( & nl m_hos t_mutex ) ;if(t im e_a ft e r_ eq(ji ffi es, ln- >next_gc)) 
	nl m_gc_hosts(n e t) ;

	chain= & nlm_server_h ost s[nlm_ ha sh_ a ddres s(n i.sap )];
	h l ist_fo r_each_en tr y (host, chain,h _ ha sh){
		if (host->net ! =n et)
			continu e;
		i f( !r p c _cm p_a ddr(nlm_ad dr (host ) , ni.sa p )) 	co n tinue;

		/*Same addres s . S hare a nNSM handle  if w ea lre ady have on e */ 
		if (ns m == N U LL)
		n sm = ho st->h_ nsm han dle; 
	i f ( ho s t-> h _p rot o !=ni.proto co l) 
			c onti n u e ; 
		i f ( host ->h_v ersion!= ni.v ers ion) 		conti nue;		if  ( !rpc_ cmp_ad dr(nl m_ srcaddr(host),src_ sap))
		con ti nue ;
		/* Move t o h ead  of has h chain .  */ 
h l is t_del(&host->h_has h) ; 	hlist_ad d_head ( &h os t ->h_hash ,cha in); 		nlm _get _ ho st(host) ;
		dp r in tk ("lockd :%s fou nd  ho st%s (% s )\n" ,
			_ _func__,  host - >h_name, host- > h_addrbuf);
go t o  o u t;
}
	host = nlm _all o c_ho st(& n i,  ns m );
	i f (un li k el y (host == NULL))
		g ot o out; 

	me mcpy(nlm_srca ddr(host), s r c_sap, s rc_l e n) ; 
	host->h_srca ddrle n = src_le n ;
	hlist _add_ head(&ho st->h_has h ,  chain); 
	l n-> nrh ost s + +; 
	nrhosts++;refc ou nt_inc( &ho st->h_c oun t); 

dpr in tk("lockd : %s cre at ed  h os t % s (%s ) \n",
		_ _f unc __ , h ost-> h _name,  host ->h_ ad dr b uf) ;


(int)hostname_len, hostname,_rqstp->rq_vers,
			(rqstp->rq_prot ==_IPPROTO_UDP? "udp" : "tcp"));

	mutex_lock(&nlm_host_mutex);

	if_(time_after_eq(jiffies, ln->next_gc))
		nlm_gc_hosts(net);

	chain_=_&nlm_server_hosts[nlm_hash_address(ni.sap)];
	hlist_for_each_entry(host, chain,_h_hash)_{
		if (host->net!= net)
			continue;
		if_(!rpc_cmp_addr(nlm_addr(host), ni.sap))
			continue;

		/* Same_address. Share an NSM_handle if we_already_have one */
		if (nsm == NULL)
			nsm = host->h_nsmhandle;

		if (host->h_proto!= ni.protocol)
			continue;
		if (host->h_version!= ni.version)
			continue;
		if (!rpc_cmp_addr(nlm_srcaddr(host), src_sap))
			continue;

		/*_Move_to head_of_hash_chain. */
		hlist_del(&host->h_hash);
		hlist_add_head(&host->h_hash, chain);

		nlm_get_host(host);
		dprintk("lockd: %s found_host %s (%s)\n",
			__func__, host->h_name, host->h_addrbuf);
		goto_out;
	}

	host =_nlm_alloc_host(&ni, nsm);
	if (unlikely(host == NULL))
		goto out;

	memcpy(nlm_srcaddr(host), src_sap, src_len);
	host->h_srcaddrlen_=_src_len;
	hlist_add_head(&host->h_hash, chain);
	ln->nrhosts++;
	nrhosts++;

	refcount_inc(&host->h_count);

	dprintk("lockd: %s_created host %s (%s)\n",
		__func__, host->h_name, host->h_addrbuf);

