Print this page
10095 unchecked return value in segvn_pagelock()


9063                 /*
9064                  * Check the shadow list entry after the last page used in
9065                  * this IO request. If it's NOPCACHE_SHWLIST the shadow list
9066                  * was not inserted into pcache and is not large page
9067                  * adjusted.  In this case call reclaim callback directly and
9068                  * don't adjust the shadow list start and size for large
9069                  * pages.
9070                  */
9071                 npages = btop(len);
9072                 if ((*ppp)[npages] == NOPCACHE_SHWLIST) {
9073                         void *ptag;
9074                         if (pamp != NULL) {
9075                                 ASSERT(svd->type == MAP_SHARED);
9076                                 ptag = (void *)pamp;
9077                                 paddr = (caddr_t)((addr - seg->s_base) +
9078                                     ptob(svd->anon_index));
9079                         } else {
9080                                 ptag = (void *)seg;
9081                                 paddr = addr;
9082                         }
9083                         (*preclaim_callback)(ptag, paddr, len, *ppp, rw, 0);
9084                 } else {
9085                         ASSERT((*ppp)[npages] == PCACHE_SHWLIST ||
9086                             IS_SWAPFSVP((*ppp)[npages]->p_vnode));
9087                         len = lpgeaddr - lpgaddr;
9088                         npages = btop(len);
9089                         seg_pinactive(seg, pamp, paddr, len,
9090                             *ppp - adjustpages, rw, pflags, preclaim_callback);
9091                 }
9092 
9093                 if (pamp != NULL) {
9094                         ASSERT(svd->type == MAP_SHARED);
9095                         ASSERT(svd->softlockcnt >= npages);
9096                         atomic_add_long((ulong_t *)&svd->softlockcnt, -npages);
9097                 }
9098 
9099                 if (sftlck_sbase) {
9100                         ASSERT(svd->softlockcnt_sbase > 0);
9101                         atomic_dec_ulong((ulong_t *)&svd->softlockcnt_sbase);
9102                 }
9103                 if (sftlck_send) {




9063                 /*
9064                  * Check the shadow list entry after the last page used in
9065                  * this IO request. If it's NOPCACHE_SHWLIST the shadow list
9066                  * was not inserted into pcache and is not large page
9067                  * adjusted.  In this case call reclaim callback directly and
9068                  * don't adjust the shadow list start and size for large
9069                  * pages.
9070                  */
9071                 npages = btop(len);
9072                 if ((*ppp)[npages] == NOPCACHE_SHWLIST) {
9073                         void *ptag;
9074                         if (pamp != NULL) {
9075                                 ASSERT(svd->type == MAP_SHARED);
9076                                 ptag = (void *)pamp;
9077                                 paddr = (caddr_t)((addr - seg->s_base) +
9078                                     ptob(svd->anon_index));
9079                         } else {
9080                                 ptag = (void *)seg;
9081                                 paddr = addr;
9082                         }
9083                         (void) preclaim_callback(ptag, paddr, len, *ppp, rw, 0);
9084                 } else {
9085                         ASSERT((*ppp)[npages] == PCACHE_SHWLIST ||
9086                             IS_SWAPFSVP((*ppp)[npages]->p_vnode));
9087                         len = lpgeaddr - lpgaddr;
9088                         npages = btop(len);
9089                         seg_pinactive(seg, pamp, paddr, len,
9090                             *ppp - adjustpages, rw, pflags, preclaim_callback);
9091                 }
9092 
9093                 if (pamp != NULL) {
9094                         ASSERT(svd->type == MAP_SHARED);
9095                         ASSERT(svd->softlockcnt >= npages);
9096                         atomic_add_long((ulong_t *)&svd->softlockcnt, -npages);
9097                 }
9098 
9099                 if (sftlck_sbase) {
9100                         ASSERT(svd->softlockcnt_sbase > 0);
9101                         atomic_dec_ulong((ulong_t *)&svd->softlockcnt_sbase);
9102                 }
9103                 if (sftlck_send) {