/* This function returns the number of orphans that can be written in half the total space. That leaves half the space for adding new orphans.  */
static int tot_avail_orphs(struct ubifs_info *c)
/* This function returns the number of orphans that can be written in half the total space. That leaves half the space for adding new orphans.  */
static int tot_avail_orphs(struct ubifs_info *c)
{
	int avail_lebs, avail;
	avail_lebs = c->orph_lebs;
	avail = avail_lebs *
	       ((c->leb_size - UBIFS_ORPH_NODE_SZ) / sizeof(__le64));
	return avail / 2;
}