Lines Matching defs:le
568 struct chfs_ltree_entry le, *result;
569 le.lnr = lnr;
570 result = RB_FIND(ltree_rbtree, &ebh->ltree, &le);
588 struct chfs_ltree_entry *le, *result;
590 le = kmem_alloc(sizeof(struct chfs_ltree_entry), KM_SLEEP);
592 le->lnr = lnr;
593 le->users = 1;
594 rw_init(&le->mutex);
599 result = RB_INSERT(ltree_rbtree, &ebh->ltree, le);
604 kmem_free(le, sizeof(struct chfs_ltree_entry));
607 result = le;
624 struct chfs_ltree_entry *le;
626 le = ltree_add_entry(ebh, lnr);
627 if (!le)
630 rw_enter(&le->mutex, RW_READER);
645 struct chfs_ltree_entry *le;
649 le = ltree_lookup(ebh, lnr);
650 if (!le)
653 le->users -= 1;
654 KASSERT(le->users >= 0);
655 rw_exit(&le->mutex);
656 if (le->users == 0) {
657 le = RB_REMOVE(ltree_rbtree, &ebh->ltree, le);
658 if (le) {
659 rw_destroy(&le->mutex);
661 kmem_free(le, sizeof(struct chfs_ltree_entry));
680 struct chfs_ltree_entry *le;
682 le = ltree_add_entry(ebh, lnr);
683 if (!le)
686 rw_enter(&le->mutex, RW_WRITER);
701 struct chfs_ltree_entry *le;
705 le = ltree_lookup(ebh, lnr);
706 if (!le)
709 le->users -= 1;
710 KASSERT(le->users >= 0);
711 rw_exit(&le->mutex);
712 if (le->users == 0) {
713 RB_REMOVE(ltree_rbtree, &ebh->ltree, le);
715 rw_destroy(&le->mutex);
717 kmem_free(le, sizeof(struct chfs_ltree_entry));