Print this page
patch lower-case-segops

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/vm_subr.c
          +++ new/usr/src/uts/common/os/vm_subr.c
↓ open down ↓ 370 lines elided ↑ open up ↑
 371  371                          AS_LOCK_EXIT(as, &as->a_lock);
 372  372                          return (EINVAL);
 373  373                  }
 374  374                  /*
 375  375                   * The COW scheme should work for all segment types.
 376  376                   * But to be safe, we check against segvn.
 377  377                   */
 378  378                  if (seg->s_ops != &segvn_ops) {
 379  379                          AS_LOCK_EXIT(as, &as->a_lock);
 380  380                          return (ENOTSUP);
 381      -                } else if ((SEGOP_GETTYPE(seg, uaddr) & MAP_PRIVATE) == 0) {
      381 +                } else if ((segop_gettype(seg, uaddr) & MAP_PRIVATE) == 0) {
 382  382                          AS_LOCK_EXIT(as, &as->a_lock);
 383  383                          return (ENOTSUP);
 384  384                  }
 385  385          }
 386  386          hat = as->a_hat;
 387  387          size = total;
 388  388  tryagain:
 389  389          /*
 390  390           * If (cow), hat_softlock will also change the usr protection to RO.
 391  391           * This is the first step toward setting up cow. Before we
↓ open down ↓ 127 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX