--- modules/freebsd/vmblock/vnops.c.orig 2020-02-04 10:10:25 UTC +++ modules/freebsd/vmblock/vnops.c @@ -533,16 +533,20 @@ struct vop_generic_args { * returns a VREF'ed vpp unless it gets an error.) */ if (descp->vdesc_vpp_offset != VDESC_NO_OFFSET && +#if __FreeBSD_version < 1300076 !(descp->vdesc_flags & VDESC_NOMAP_VPP) && +#endif !error) { /* * XXX - even though some ops have vpp returned vp's, several ops * actually vrele this before returning. We must avoid these ops. * (This should go away when these ops are regularized.) */ +#if __FreeBSD_version < 1300076 if (descp->vdesc_flags & VDESC_VPP_WILLRELE) { goto out; } +#endif vppp = VOPARG_OFFSETTO(struct vnode***, descp->vdesc_vpp_offset,ap); if (*vppp) { /* FIXME: set proper name for the vnode */ @@ -550,7 +554,9 @@ struct vop_generic_args { } } +#if __FreeBSD_version < 1300076 out: +#endif return error; } @@ -1262,12 +1268,15 @@ struct vop_unlock_args { */ { struct vnode *vp = ap->a_vp; +#if __FreeBSD_version < 1300074 int flags = ap->a_flags; +#endif COMPAT_THREAD_VAR(td, ap->a_td); struct VMBlockNode *nn; struct vnode *lvp; int error; +#if __FreeBSD_version < 1300074 /* * If caller already holds interlock, drop it. (Per VOP_UNLOCK() API.) * Also strip LK_INTERLOCK from flags passed to lower layer. @@ -1276,6 +1285,7 @@ struct vop_unlock_args { VI_UNLOCK(vp); ap->a_flags = flags &= ~LK_INTERLOCK; } +#endif nn = VPTOVMB(vp); if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) { error = COMPAT_VOP_UNLOCK(lvp, flags, td);