sys/vfs/union/union_vnops.c
static int
union_mknod(struct vop_old_mknod_args *ap)
{
	struct union_node *dun = VTOUNION(ap->a_dvp);
	struct componentname *cnp = ap->a_cnp;
	struct vnode *dvp;
	int error = EROFS;

	if ((dvp = union_lock_upper(dun, cnp->cn_td)) != NULL) {
		error = VOP_MKNOD(dvp, ap->a_vpp, cnp, ap->a_vap);
		union_unlock_upper(dvp, cnp->cn_td);
	}
	return (error);
}
/*
 * 	union_mknod:
 *
 *	a_dvp is locked on entry and should remain locked on return.
 *	a_vpp is garbagre whether an error occurs or not.
 *
 * union_mknod(struct vnode *a_dvp, struct vnode **a_vpp,
 *		struct componentname *a_cnp, struct vattr *a_vap)
 */
a_dvp is locked on entry and should remain locked on return.
a_vpp is garbagre whether an error occurs or not.


a_dvp is locked on entry and should remain locked on return . a_vpp is garbagre whether an error occurs or not .
static int
union_mknod(struct vop_old_mknod_args *ap)
{
	struct union_node *dun = VTOUNION(ap->a_dvp);
	struct componentname *cnp = ap->a_cnp;
	struct vnode *dvp;
	int error = EROFS;
	if ((dvp = union_lock_upper(dun, cnp->cn_td)) != NULL) {
		error = VOP_MKNOD(dvp, ap->a_vpp, cnp, ap->a_vap);
		union_unlock_upper(dvp, cnp->cn_td);
	}
	return (error);
}
static int union_mknod ( struct vop_old_mknod_args * ap ) { struct union_node * dun = VTOUNION ( ap -> a_dvp ) ; struct componentname * cnp = ap -> a_cnp ; struct vnode * dvp ; int error = EROFS ; if ( ( dvp = union_lock_upper ( dun , cnp -> cn_td ) ) != NULL ) { error = VOP_MKNOD ( dvp , ap -> a_vpp , cnp , ap -> a_vap ) ; union_unlock_upper ( dvp , cnp -> cn_td ) ; } return ( error ) ; }
union_mknod:
      a_dvp is locked on entry and should remain locked on return.
union_mknod : a_dvp is locked on entry and should remain locked on return .