if (vp->v_usecount > 1) { if (!np->n_sillyrename) error = nfs_sillyrename(dvp, vp, cnp); else if (VOP_GETATTR(vp, &vattr, cnp->cn_cred, cnp->cn_proc) == 0 && vattr.va_nlink > 1)  goto doit; } else { doit:
nfs_remove(v)	void *v;{	struct vop_remove_args /* {		struct vnodeop_desc *a_desc;		struct vnode * a_dvp;		struct vnode * a_vp;		struct componentname * a_cnp;	} */ *ap = v;	register struct vnode *vp = ap->a_vp;	register struct vnode *dvp = ap->a_dvp;	register struct componentname *cnp = ap->a_cnp;	register struct nfsnode *np = VTONFS(vp);	register u_int32_t *tl;	register caddr_t cp;	register int32_t t2;	caddr_t bpos, dpos;	int error = 0;	struct mbuf *mreq, *mrep, *md, *mb, *mb2;	struct vattr vattr;	if (vp->v_usecount > 1) {		if (!np->n_sillyrename)			error = nfs_sillyrename(dvp, vp, cnp);		else if (VOP_GETATTR(vp, &vattr, cnp->cn_cred, cnp->cn_proc)			 == 0 && vattr.va_nlink > 1)			/*			 * If we already have a silly name but there are more			 * than one links, just proceed with the NFS remove			 * request, as the bits will remain available (modulo			 * network races). This avoids silently ignoring the			 * attempted removal of a non-silly entry.			 */			goto doit;	} else {	doit:		/*		 * Purge the name cache so that the chance of a lookup for		 * the name succeeding while the remove is in progress is		 * minimized. Without node locking it can still happen, such		 * that an I/O op returns ESTALE, but since you get this if		 * another host removes the file..		 */		cache_purge(vp);		/*		 * Throw away biocache buffers. Mainly to avoid		 * unnecessary delayed writes.		 */		error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_proc, 1);		if (error == EINTR)			return (error);		/* Do the rpc */		nfsstats.rpccnt[NFSPROC_REMOVE]++;		nfsm_reqhead(dvp, NFSPROC_REMOVE,			NFSX_FH+NFSX_UNSIGNED+nfsm_rndup(cnp->cn_namelen));		nfsm_fhtom(dvp);		nfsm_strtom(cnp->cn_nameptr, cnp->cn_namelen, NFS_MAXNAMLEN);		nfsm_request(dvp, NFSPROC_REMOVE, cnp->cn_proc, cnp->cn_cred);		nfsm_reqdone;		FREE(cnp->cn_pnbuf, M_NAMEI);		VTONFS(dvp)->n_flag |= NMODIFIED;		VTONFS(dvp)->n_attrstamp = 0;		/*		 * Kludge City: If the first reply to the remove rpc is lost..		 *   the reply to the retransmitted request will be ENOENT		 *   since the file was in fact removed		 *   Therefore, we cheat and return success.		 */		if (error == ENOENT)			error = 0;	}	np->n_attrstamp = 0;	vrele(dvp);	vrele(vp);	return (error);}