if (fip->fi_readers != 0 || fip->fi_writers != 0) return (0); error1 = soclose(fip->fi_readsock); error2 = soclose(fip->fi_writesock); FREE(fip, M_VNODE); vp->v_fifoinfo = NULL; if (error1) return (error1); return (error2);
if (fip->fi_readers == 0 && fip->fi_writers == 0) { error1 = soclose(fip->fi_readsock); error2 = soclose(fip->fi_writesock); FREE(fip, M_VNODE); vp->v_fifoinfo = NULL; } return (error1 ? error1 : error2);
fifo_close(v)	void *v;{	struct vop_close_args /* {		struct vnode *a_vp;		int  a_fflag;		struct ucred *a_cred;		struct proc *a_p;	} */ *ap = v;	register struct vnode *vp = ap->a_vp;	register struct fifoinfo *fip = vp->v_fifoinfo;	int error1, error2;	if (ap->a_fflag & FREAD) {		if (--fip->fi_readers == 0)			socantsendmore(fip->fi_writesock);	}	if (ap->a_fflag & FWRITE) {		if (--fip->fi_writers == 0)			socantrcvmore(fip->fi_readsock);	}	if (fip->fi_readers != 0 || fip->fi_writers != 0)		return (0);	error1 = soclose(fip->fi_readsock);	error2 = soclose(fip->fi_writesock);	FREE(fip, M_VNODE);	vp->v_fifoinfo = NULL;	if (error1)		return (error1);	return (error2);}