list_del(&dp->dl_del_perfile); list_del(&dp->dl_del_perclnt); nfs4_put_delegation(dp); free_delegation++; 
unhash_delegation(dp); 
nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_stateid *stp){	struct nfs4_delegation *dp;	struct nfs4_stateowner *sop = stp->st_stateowner;	struct nfs4_callback *cb = &sop->so_client->cl_callback;	struct file_lock fl, *flp = &fl;	int status, flag = 0;	flag = NFS4_OPEN_DELEGATE_NONE;	if (open->op_claim_type != NFS4_OPEN_CLAIM_NULL	     || !atomic_read(&cb->cb_set) || !sop->so_confirmed)		goto out;	if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)		flag = NFS4_OPEN_DELEGATE_WRITE;	else		flag = NFS4_OPEN_DELEGATE_READ;	dp = alloc_init_deleg(sop->so_client, stp, fh, flag);	if (dp == NULL) {		flag = NFS4_OPEN_DELEGATE_NONE;		goto out;	}	locks_init_lock(&fl);	fl.fl_lmops = &nfsd_lease_mng_ops;	fl.fl_flags = FL_LEASE;	fl.fl_end = OFFSET_MAX;	fl.fl_owner =  (fl_owner_t)dp;	fl.fl_file = stp->st_vfs_file;	fl.fl_pid = current->tgid;	/* setlease checks to see if delegation should be handed out.	 * the lock_manager callbacks fl_mylease and fl_change are used	 */	if ((status = setlease(stp->st_vfs_file,		flag == NFS4_OPEN_DELEGATE_READ? F_RDLCK: F_WRLCK, &flp))) {		dprintk("NFSD: setlease failed [%d], no delegation\n", status);		list_del(&dp->dl_del_perfile);		list_del(&dp->dl_del_perclnt);		nfs4_put_delegation(dp);		free_delegation++;		flag = NFS4_OPEN_DELEGATE_NONE;		goto out;	}	memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid));	dprintk("NFSD: delegation stateid=(%08x/%08x/%08x/%08x)\n\n",	             dp->dl_stateid.si_boot,	             dp->dl_stateid.si_stateownerid,	             dp->dl_stateid.si_fileid,	             dp->dl_stateid.si_generation);out:	open->op_delegate_type = flag;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c907132d534c10b4f34a60383c8384403cb424a4/nfs4state.c/clean/fs/nfsd/nfs4state.c