Print this page
patch lower-case-segops


 525                 /* Now we can drop p_lock again */
 526                 mutex_exit(&prp->p_lock);
 527 
 528                 /*
 529                  * now we want to walk a processes memory mappings.
 530                  * to do this we need to grab the prp->p_as lock.  (you
 531                  * can't hold p_lock when grabbing the prp->p_as lock.)
 532                  */
 533                 if (prp->p_as != &kas) {
 534                         struct seg      *seg;
 535                         struct as       *as = prp->p_as;
 536 
 537                         AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
 538                         for (seg = AS_SEGFIRST(as); seg;
 539                             seg = AS_SEGNEXT(as, seg)) {
 540                                 /*
 541                                  * if we can't get a backing vnode for this
 542                                  * segment then skip it
 543                                  */
 544                                 vp = NULL;
 545                                 if ((SEGOP_GETVP(seg, seg->s_base, &vp)) ||
 546                                     (vp == NULL))
 547                                         continue;
 548 
 549                                 /*
 550                                  * if the target file (fvp) is not a device
 551                                  * and corrosponds to the root of a filesystem
 552                                  * (cvfsp), then check if it contains the
 553                                  * vnode backing this segment (vp).
 554                                  */
 555                                 if (contained && (vp->v_vfsp == cvfsp)) {
 556                                         use_flag |= F_MAP;
 557                                         break;
 558                                 }
 559 
 560                                 /*
 561                                  * if the target file (fvp) is not a device,
 562                                  * check if it matches the the vnode backing
 563                                  * this segment (vp).
 564                                  */
 565                                 if (!fvp_isdev && VN_CMP(fvp, vp)) {




 525                 /* Now we can drop p_lock again */
 526                 mutex_exit(&prp->p_lock);
 527 
 528                 /*
 529                  * now we want to walk a processes memory mappings.
 530                  * to do this we need to grab the prp->p_as lock.  (you
 531                  * can't hold p_lock when grabbing the prp->p_as lock.)
 532                  */
 533                 if (prp->p_as != &kas) {
 534                         struct seg      *seg;
 535                         struct as       *as = prp->p_as;
 536 
 537                         AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
 538                         for (seg = AS_SEGFIRST(as); seg;
 539                             seg = AS_SEGNEXT(as, seg)) {
 540                                 /*
 541                                  * if we can't get a backing vnode for this
 542                                  * segment then skip it
 543                                  */
 544                                 vp = NULL;
 545                                 if ((segop_getvp(seg, seg->s_base, &vp)) ||
 546                                     (vp == NULL))
 547                                         continue;
 548 
 549                                 /*
 550                                  * if the target file (fvp) is not a device
 551                                  * and corrosponds to the root of a filesystem
 552                                  * (cvfsp), then check if it contains the
 553                                  * vnode backing this segment (vp).
 554                                  */
 555                                 if (contained && (vp->v_vfsp == cvfsp)) {
 556                                         use_flag |= F_MAP;
 557                                         break;
 558                                 }
 559 
 560                                 /*
 561                                  * if the target file (fvp) is not a device,
 562                                  * check if it matches the the vnode backing
 563                                  * this segment (vp).
 564                                  */
 565                                 if (!fvp_isdev && VN_CMP(fvp, vp)) {