/* LEB properties are categorized to enable fast find operations. When the LEB properties change they must be re-categorized.  */
static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
/* LEB properties are categorized to enable fast find operations. When the LEB properties change they must be re-categorized.  */
static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
{
	int old_cat = lprops->flags & LPROPS_CAT_MASK;
	int new_cat = ubifs_categorize_lprops(c, lprops);
	if (old_cat == new_cat) {
		struct ubifs_lpt_heap *heap;
		if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)
			return;
		heap = &c->lpt_heap[new_cat - 1];
		adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat);
	} else {
		ubifs_remove_from_cat(c, lprops, old_cat);
		ubifs_add_to_cat(c, lprops, new_cat);
	}
}