Lines Matching refs:pl

1679 pcachelink_locked_rele(pcachelink_t *pl)  in pcachelink_locked_rele()  argument
1681 ASSERT(MUTEX_HELD(&pl->pcl_lock)); in pcachelink_locked_rele()
1682 VERIFY(pl->pcl_refcnt >= 1); in pcachelink_locked_rele()
1684 pl->pcl_refcnt--; in pcachelink_locked_rele()
1685 if (pl->pcl_refcnt == 0) { in pcachelink_locked_rele()
1686 VERIFY(pl->pcl_state == PCL_INVALID); in pcachelink_locked_rele()
1687 ASSERT(pl->pcl_parent_pc == NULL); in pcachelink_locked_rele()
1688 ASSERT(pl->pcl_child_pc == NULL); in pcachelink_locked_rele()
1689 ASSERT(pl->pcl_parent_next == NULL); in pcachelink_locked_rele()
1690 ASSERT(pl->pcl_child_next == NULL); in pcachelink_locked_rele()
1692 pl->pcl_state = PCL_FREE; in pcachelink_locked_rele()
1693 mutex_destroy(&pl->pcl_lock); in pcachelink_locked_rele()
1694 kmem_free(pl, sizeof (pcachelink_t)); in pcachelink_locked_rele()
1696 mutex_exit(&pl->pcl_lock); in pcachelink_locked_rele()
1708 pcachelink_t *pl, **plpn; in pcachelink_assoc() local
1715 for (pl = child->pc_parents; pl != NULL; pl = *plpn) { in pcachelink_assoc()
1716 mutex_enter(&pl->pcl_lock); in pcachelink_assoc()
1717 if (pl->pcl_state == PCL_INVALID) { in pcachelink_assoc()
1719 *plpn = pl->pcl_parent_next; in pcachelink_assoc()
1720 pl->pcl_child_pc = NULL; in pcachelink_assoc()
1721 pl->pcl_parent_next = NULL; in pcachelink_assoc()
1722 pcachelink_locked_rele(pl); in pcachelink_assoc()
1723 } else if (pl->pcl_parent_pc == parent) { in pcachelink_assoc()
1725 ASSERT(pl->pcl_state == PCL_VALID || in pcachelink_assoc()
1726 pl->pcl_state == PCL_STALE); in pcachelink_assoc()
1727 pl->pcl_state = PCL_VALID; in pcachelink_assoc()
1728 mutex_exit(&pl->pcl_lock); in pcachelink_assoc()
1731 plpn = &pl->pcl_parent_next; in pcachelink_assoc()
1732 mutex_exit(&pl->pcl_lock); in pcachelink_assoc()
1737 pl = kmem_zalloc(sizeof (pcachelink_t), KM_SLEEP); in pcachelink_assoc()
1738 mutex_init(&pl->pcl_lock, NULL, MUTEX_DEFAULT, NULL); in pcachelink_assoc()
1740 pl->pcl_parent_pc = parent; in pcachelink_assoc()
1741 pl->pcl_child_next = parent->pc_children; in pcachelink_assoc()
1742 parent->pc_children = pl; in pcachelink_assoc()
1743 pl->pcl_refcnt++; in pcachelink_assoc()
1745 pl->pcl_child_pc = child; in pcachelink_assoc()
1746 pl->pcl_parent_next = child->pc_parents; in pcachelink_assoc()
1747 child->pc_parents = pl; in pcachelink_assoc()
1748 pl->pcl_refcnt++; in pcachelink_assoc()
1750 pl->pcl_state = PCL_VALID; in pcachelink_assoc()
1760 pcachelink_t *pl, **plpn; in pcachelink_mark_stale() local
1765 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) { in pcachelink_mark_stale()
1766 mutex_enter(&pl->pcl_lock); in pcachelink_mark_stale()
1767 if (pl->pcl_state == PCL_INVALID) { in pcachelink_mark_stale()
1772 *plpn = pl->pcl_child_next; in pcachelink_mark_stale()
1773 pl->pcl_parent_pc = NULL; in pcachelink_mark_stale()
1774 pl->pcl_child_next = NULL; in pcachelink_mark_stale()
1775 pcachelink_locked_rele(pl); in pcachelink_mark_stale()
1777 pl->pcl_state = PCL_STALE; in pcachelink_mark_stale()
1778 plpn = &pl->pcl_child_next; in pcachelink_mark_stale()
1779 mutex_exit(&pl->pcl_lock); in pcachelink_mark_stale()
1790 pcachelink_t *pl, **plpn; in pcachelink_purge_stale() local
1795 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) { in pcachelink_purge_stale()
1796 mutex_enter(&pl->pcl_lock); in pcachelink_purge_stale()
1797 switch (pl->pcl_state) { in pcachelink_purge_stale()
1799 pl->pcl_state = PCL_INVALID; in pcachelink_purge_stale()
1802 *plpn = pl->pcl_child_next; in pcachelink_purge_stale()
1803 pl->pcl_parent_pc = NULL; in pcachelink_purge_stale()
1804 pl->pcl_child_next = NULL; in pcachelink_purge_stale()
1805 pcachelink_locked_rele(pl); in pcachelink_purge_stale()
1808 plpn = &pl->pcl_child_next; in pcachelink_purge_stale()
1809 mutex_exit(&pl->pcl_lock); in pcachelink_purge_stale()
1820 pcachelink_t *pl, **plpn; in pcachelink_purge_all() local
1825 for (pl = pcp->pc_parents; pl != NULL; pl = *plpn) { in pcachelink_purge_all()
1826 mutex_enter(&pl->pcl_lock); in pcachelink_purge_all()
1827 pl->pcl_state = PCL_INVALID; in pcachelink_purge_all()
1828 *plpn = pl->pcl_parent_next; in pcachelink_purge_all()
1829 pl->pcl_child_pc = NULL; in pcachelink_purge_all()
1830 pl->pcl_parent_next = NULL; in pcachelink_purge_all()
1831 pcachelink_locked_rele(pl); in pcachelink_purge_all()
1835 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) { in pcachelink_purge_all()
1836 mutex_enter(&pl->pcl_lock); in pcachelink_purge_all()
1837 pl->pcl_state = PCL_INVALID; in pcachelink_purge_all()
1838 *plpn = pl->pcl_child_next; in pcachelink_purge_all()
1839 pl->pcl_parent_pc = NULL; in pcachelink_purge_all()
1840 pl->pcl_child_next = NULL; in pcachelink_purge_all()
1841 pcachelink_locked_rele(pl); in pcachelink_purge_all()