/* This function returns LEB properties for a freeable LEB or NULL if the function is unable to find a freeable LEB quickly.  */
const struct ubifs_lprops* ubifs_fast_find_freeable(struct ubifs_info *c)
/* This function returns LEB properties for a freeable LEB or NULL if the function is unable to find a freeable LEB quickly.  */
const struct ubifs_lprops* ubifs_fast_find_freeable(struct ubifs_info *c)
{
	struct ubifs_lprops *lprops;
	ubifs_assert(mutex_is_locked(&c->lp_mutex));
	if (list_empty(&c->freeable_list))
		return NULL;
	lprops = list_entry(c->freeable_list.next, struct ubifs_lprops, list);
	ubifs_assert(!(lprops->flags & LPROPS_TAKEN));
	ubifs_assert(!(lprops->flags & LPROPS_INDEX));
	ubifs_assert(lprops->free + lprops->dirty == c->leb_size);
	ubifs_assert(c->freeable_cnt > 0);
	return lprops;
}