nfsd4_probe_callback(clp); 
nfsd4_probe_callback(conf); 
nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm){	u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;	struct nfs4_client *clp, *conf = NULL, *unconf = NULL;	nfs4_verifier confirm = setclientid_confirm->sc_confirm; 	clientid_t * clid = &setclientid_confirm->sc_clientid;	int status;	if (STALE_CLIENTID(clid))		return nfserr_stale_clientid;	/* 	 * XXX The Duplicate Request Cache (DRC) has been checked (??)	 * We get here on a DRC miss.	 */	nfs4_lock_state();	clp = find_confirmed_client(clid);	if (clp) {		status = nfserr_clid_inuse;		if (clp->cl_addr != ip_addr) { 			printk("NFSD: setclientid: string in use by client"			"(clientid %08x/%08x)\n",			clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);			goto out;		}		conf = clp;	}	clp = find_unconfirmed_client(clid);	if (clp) {		status = nfserr_clid_inuse;		if (clp->cl_addr != ip_addr) { 			printk("NFSD: setclientid: string in use by client"			"(clientid %08x/%08x)\n",			clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);			goto out;		}		unconf = clp;	}	if ((conf && unconf) && 	    (cmp_verf(&unconf->cl_confirm, &confirm)) &&	    (cmp_verf(&conf->cl_verifier, &unconf->cl_verifier)) &&	    (same_name(conf->cl_recdir,unconf->cl_recdir))  &&	    (!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm))) {		/* CASE 1:		* unconf record that matches input clientid and input confirm.		* conf record that matches input clientid.		* conf and unconf records match names, verifiers		*/		if (!cmp_creds(&conf->cl_cred, &unconf->cl_cred)) 			status = nfserr_clid_inuse;		else {			/* XXX: We just turn off callbacks until we can handle			  * change request correctly. */			clp = conf;			clp->cl_callback.cb_parsed = 0;			gen_confirm(clp);			expire_client(unconf);			status = nfs_ok;		}	} else if ((conf && !unconf) ||	    ((conf && unconf) && 	     (!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) ||	      !same_name(conf->cl_recdir, unconf->cl_recdir)))) {		/* CASE 2:		 * conf record that matches input clientid.		 * if unconf record matches input clientid, then		 * unconf->cl_name or unconf->cl_verifier don't match the		 * conf record.		 */		if (!cmp_creds(&conf->cl_cred,&rqstp->rq_cred)) {			status = nfserr_clid_inuse;		} else {			clp = conf;			status = nfs_ok;		}	} else if (!conf && unconf			&& cmp_verf(&unconf->cl_confirm, &confirm)) {		/* CASE 3:		 * conf record not found.		 * unconf record found.		 * unconf->cl_confirm matches input confirm		 */		if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) {			status = nfserr_clid_inuse;		} else {			unsigned int hash =				clientstr_hashval(unconf->cl_recdir);			conf = find_confirmed_client_by_str(unconf->cl_recdir,									hash);			if (conf) {				expire_client(conf);			}			clp = unconf;			move_to_confirmed(unconf);			status = nfs_ok;		}	} else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm)))	    && (!unconf || (unconf && !cmp_verf(&unconf->cl_confirm,				    				&confirm)))) {		/* CASE 4:		 * conf record not found, or if conf, conf->cl_confirm does not		 * match input confirm.		 * unconf record not found, or if unconf, unconf->cl_confirm		 * does not match input confirm.		 */		status = nfserr_stale_clientid;	} else {		/* check that we have hit one of the cases...*/		status = nfserr_clid_inuse;	}out:	if (!status)		nfsd4_probe_callback(clp);	nfs4_unlock_state();	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/21ab45a480ec7705d177e959ebf452d62340c004/nfs4state.c/buggy/fs/nfsd/nfs4state.c