View | Details | Raw Unified | Return to bug 243864 | Differences between
and this patch

Collapse All | Expand All

(-)modules/freebsd/vmblock/vnops.c (-7 / +5 lines)
Lines 532-548 struct vop_generic_args { Link Here
532
    * Map the possible out-going vpp (Assumes that the lower layer always
532
    * Map the possible out-going vpp (Assumes that the lower layer always
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 && !error) {
536
       !(descp->vdesc_flags & VDESC_NOMAP_VPP) &&
537
       !error) {
538
      /*
536
      /*
539
       * XXX - even though some ops have vpp returned vp's, several ops
537
       * XXX - even though some ops have vpp returned vp's, several ops
540
       * actually vrele this before returning.  We must avoid these ops.
538
       * actually vrele this before returning.  We must avoid these ops.
541
       * (This should go away when these ops are regularized.)
539
       * (This should go away when these ops are regularized.)
542
       */
540
       */
543
      if (descp->vdesc_flags & VDESC_VPP_WILLRELE) {
544
         goto out;
545
      }
546
      vppp = VOPARG_OFFSETTO(struct vnode***, descp->vdesc_vpp_offset,ap);
541
      vppp = VOPARG_OFFSETTO(struct vnode***, descp->vdesc_vpp_offset,ap);
547
      if (*vppp) {
542
      if (*vppp) {
548
         /* FIXME: set proper name for the vnode */
543
         /* FIXME: set proper name for the vnode */
Lines 550-556 struct vop_generic_args { Link Here
550
      }
545
      }
551
   }
546
   }
552
547
553
out:
554
   return error;
548
   return error;
555
}
549
}
556
550
Lines 1262-1273 struct vop_unlock_args { Link Here
1262
*/
1256
*/
1263
{
1257
{
1264
   struct vnode *vp = ap->a_vp;
1258
   struct vnode *vp = ap->a_vp;
1259
#if __FreeBSD_version < 1300074
1265
   int flags = ap->a_flags;
1260
   int flags = ap->a_flags;
1261
#endif
1266
   COMPAT_THREAD_VAR(td, ap->a_td);
1262
   COMPAT_THREAD_VAR(td, ap->a_td);
1267
   struct VMBlockNode *nn;
1263
   struct VMBlockNode *nn;
1268
   struct vnode *lvp;
1264
   struct vnode *lvp;
1269
   int error;
1265
   int error;
1270
1266
1267
#if __FreeBSD_version < 1300074
1271
   /*
1268
   /*
1272
    * If caller already holds interlock, drop it.  (Per VOP_UNLOCK() API.)
1269
    * If caller already holds interlock, drop it.  (Per VOP_UNLOCK() API.)
1273
    * Also strip LK_INTERLOCK from flags passed to lower layer.
1270
    * Also strip LK_INTERLOCK from flags passed to lower layer.
Lines 1276-1281 struct vop_unlock_args { Link Here
1276
      VI_UNLOCK(vp);
1273
      VI_UNLOCK(vp);
1277
      ap->a_flags = flags &= ~LK_INTERLOCK;
1274
      ap->a_flags = flags &= ~LK_INTERLOCK;
1278
   }
1275
   }
1276
#endif
1279
   nn = VPTOVMB(vp);
1277
   nn = VPTOVMB(vp);
1280
   if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) {
1278
   if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) {
1281
      error = COMPAT_VOP_UNLOCK(lvp, flags, td);
1279
      error = COMPAT_VOP_UNLOCK(lvp, flags, td);

Return to bug 243864