printk("NFSD: preprocess_seqid_op: bad seqid (expected %d, got %d\n", sop->so_seqid +1, seqid); 
printk("NFSD: preprocess_seqid_op: bad seqid (expected %d, got %d\n", sop->so_seqid, seqid); 
nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *stateid, int flags, struct nfs4_stateowner **sopp, struct nfs4_stateid **stpp, clientid_t *lockclid){	int status;	struct nfs4_stateid *stp;	struct nfs4_stateowner *sop;	dprintk("NFSD: preprocess_seqid_op: seqid=%d " 			"stateid = (%08x/%08x/%08x/%08x)\n", seqid,		stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid,		stateid->si_generation);			        	*stpp = NULL;	*sopp = NULL;	status = nfserr_bad_stateid;	if (ZERO_STATEID(stateid) || ONE_STATEID(stateid)) {		printk("NFSD: preprocess_seqid_op: magic stateid!\n");		goto out;	}	status = nfserr_stale_stateid;	if (STALE_STATEID(stateid))		goto out;	/*	* We return BAD_STATEID if filehandle doesn't match stateid, 	* the confirmed flag is incorrecly set, or the generation 	* number is incorrect.  	* If there is no entry in the openfile table for this id, 	* we can't always return BAD_STATEID;	* this might be a retransmitted CLOSE which has arrived after 	* the openfile has been released.	*/	if (!(stp = find_stateid(stateid, flags)))		goto no_nfs4_stateid;	status = nfserr_bad_stateid;	/* for new lock stateowners:	 * check that the lock->v.new.open_stateid	 * refers to an open stateowner	 *	 * check that the lockclid (nfs4_lock->v.new.clientid) is the same	 * as the open_stateid->st_stateowner->so_client->clientid	 */	if (lockclid) {		struct nfs4_stateowner *sop = stp->st_stateowner;		struct nfs4_client *clp = sop->so_client;		if (!sop->so_is_open_owner)			goto out;		if (!cmp_clid(&clp->cl_clientid, lockclid))			goto out;	}	if ((flags & CHECK_FH) && nfs4_check_fh(current_fh, stp)) {		printk("NFSD: preprocess_seqid_op: fh-stateid mismatch!\n");		goto out;	}	*stpp = stp;	*sopp = sop = stp->st_stateowner;	/*	*  We now validate the seqid and stateid generation numbers.	*  For the moment, we ignore the possibility of 	*  generation number wraparound.	*/	if (seqid != sop->so_seqid + 1)		goto check_replay;	if (sop->so_confirmed) {		if (flags & CONFIRM) {			printk("NFSD: preprocess_seqid_op: expected unconfirmed stateowner!\n");			goto out;		}	}	else {		if (!(flags & CONFIRM)) {			printk("NFSD: preprocess_seqid_op: stateowner not confirmed yet!\n");			goto out;		}	}	if (stateid->si_generation > stp->st_stateid.si_generation) {		printk("NFSD: preprocess_seqid_op: future stateid?!\n");		goto out;	}	status = nfserr_old_stateid;	if (stateid->si_generation < stp->st_stateid.si_generation) {		printk("NFSD: preprocess_seqid_op: old stateid!\n");		goto out;	}	/* XXX renew the client lease here */	status = nfs_ok;out:	return status;no_nfs4_stateid:	/*	* We determine whether this is a bad stateid or a replay, 	* starting by trying to look up the stateowner.	* If stateowner is not found - stateid is bad.	*/	if (!(sop = find_openstateowner_id(stateid->si_stateownerid, flags))) {		printk("NFSD: preprocess_seqid_op: no stateowner or nfs4_stateid!\n");		status = nfserr_bad_stateid;		goto out;	}	*sopp = sop;check_replay:	if (seqid == sop->so_seqid) {		printk("NFSD: preprocess_seqid_op: retransmission?\n");		/* indicate replay to calling function */		status = NFSERR_REPLAY_ME;	} else  {		printk("NFSD: preprocess_seqid_op: bad seqid (expected %d, got %d\n", sop->so_seqid +1, seqid);		*sopp = NULL;		status = nfserr_bad_seqid;	}	goto out;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/bd9aac523b812d58e644fde5e59f5697fb9e3822/nfs4state.c/buggy/fs/nfsd/nfs4state.c