/* remove_from_lpt_heap - remove LEB properties from a LEB category heap.  */
static void remove_from_lpt_heap(struct ubifs_info *c, struct ubifs_lprops *lprops, int cat)
/* remove_from_lpt_heap - remove LEB properties from a LEB category heap.  */
static void remove_from_lpt_heap(struct ubifs_info *c, struct ubifs_lprops *lprops, int cat)
{
	struct ubifs_lpt_heap *heap;
	int hpos = lprops->hpos;
	heap = &c->lpt_heap[cat - 1];
	ubifs_assert(hpos >= 0 && hpos < heap->cnt);
	ubifs_assert(heap->arr[hpos] == lprops);
	heap->cnt -= 1;
	if (hpos < heap->cnt) {
		heap->arr[hpos] = heap->arr[heap->cnt];
		heap->arr[hpos]->hpos = hpos;
		adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat);
	}
	dbg_check_heap(c, heap, cat, -1);
}