Lines 533-548
struct vop_generic_args {
Link Here
|
533 |
* returns a VREF'ed vpp unless it gets an error.) |
533 |
* returns a VREF'ed vpp unless it gets an error.) |
534 |
*/ |
534 |
*/ |
535 |
if (descp->vdesc_vpp_offset != VDESC_NO_OFFSET && |
535 |
if (descp->vdesc_vpp_offset != VDESC_NO_OFFSET && |
|
|
536 |
#if __FreeBSD_version < 1300076 |
536 |
!(descp->vdesc_flags & VDESC_NOMAP_VPP) && |
537 |
!(descp->vdesc_flags & VDESC_NOMAP_VPP) && |
|
|
538 |
#endif |
537 |
!error) { |
539 |
!error) { |
538 |
/* |
540 |
/* |
539 |
* XXX - even though some ops have vpp returned vp's, several ops |
541 |
* XXX - even though some ops have vpp returned vp's, several ops |
540 |
* actually vrele this before returning. We must avoid these ops. |
542 |
* actually vrele this before returning. We must avoid these ops. |
541 |
* (This should go away when these ops are regularized.) |
543 |
* (This should go away when these ops are regularized.) |
542 |
*/ |
544 |
*/ |
|
|
545 |
#if __FreeBSD_version < 1300076 |
543 |
if (descp->vdesc_flags & VDESC_VPP_WILLRELE) { |
546 |
if (descp->vdesc_flags & VDESC_VPP_WILLRELE) { |
544 |
goto out; |
547 |
goto out; |
545 |
} |
548 |
} |
|
|
549 |
#endif |
546 |
vppp = VOPARG_OFFSETTO(struct vnode***, descp->vdesc_vpp_offset,ap); |
550 |
vppp = VOPARG_OFFSETTO(struct vnode***, descp->vdesc_vpp_offset,ap); |
547 |
if (*vppp) { |
551 |
if (*vppp) { |
548 |
/* FIXME: set proper name for the vnode */ |
552 |
/* FIXME: set proper name for the vnode */ |
Lines 550-556
struct vop_generic_args {
Link Here
|
550 |
} |
554 |
} |
551 |
} |
555 |
} |
552 |
|
556 |
|
|
|
557 |
#if __FreeBSD_version < 1300076 |
553 |
out: |
558 |
out: |
|
|
559 |
#endif |
554 |
return error; |
560 |
return error; |
555 |
} |
561 |
} |
556 |
|
562 |
|
Lines 1262-1273
struct vop_unlock_args {
Link Here
|
1262 |
*/ |
1268 |
*/ |
1263 |
{ |
1269 |
{ |
1264 |
struct vnode *vp = ap->a_vp; |
1270 |
struct vnode *vp = ap->a_vp; |
|
|
1271 |
#if __FreeBSD_version < 1300074 |
1265 |
int flags = ap->a_flags; |
1272 |
int flags = ap->a_flags; |
|
|
1273 |
#endif |
1266 |
COMPAT_THREAD_VAR(td, ap->a_td); |
1274 |
COMPAT_THREAD_VAR(td, ap->a_td); |
1267 |
struct VMBlockNode *nn; |
1275 |
struct VMBlockNode *nn; |
1268 |
struct vnode *lvp; |
1276 |
struct vnode *lvp; |
1269 |
int error; |
1277 |
int error; |
1270 |
|
1278 |
|
|
|
1279 |
#if __FreeBSD_version < 1300074 |
1271 |
/* |
1280 |
/* |
1272 |
* If caller already holds interlock, drop it. (Per VOP_UNLOCK() API.) |
1281 |
* If caller already holds interlock, drop it. (Per VOP_UNLOCK() API.) |
1273 |
* Also strip LK_INTERLOCK from flags passed to lower layer. |
1282 |
* Also strip LK_INTERLOCK from flags passed to lower layer. |
Lines 1276-1281
struct vop_unlock_args {
Link Here
|
1276 |
VI_UNLOCK(vp); |
1285 |
VI_UNLOCK(vp); |
1277 |
ap->a_flags = flags &= ~LK_INTERLOCK; |
1286 |
ap->a_flags = flags &= ~LK_INTERLOCK; |
1278 |
} |
1287 |
} |
|
|
1288 |
#endif |
1279 |
nn = VPTOVMB(vp); |
1289 |
nn = VPTOVMB(vp); |
1280 |
if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) { |
1290 |
if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) { |
1281 |
error = COMPAT_VOP_UNLOCK(lvp, flags, td); |
1291 |
error = COMPAT_VOP_UNLOCK(lvp, flags, td); |