/* This is a helper function for 'ubifs_recover_leb()' which drops the last node of the scanned LEB.  */
static void drop_last_node(struct ubifs_scan_leb *sleb, int *offs)
/* This is a helper function for 'ubifs_recover_leb()' which drops the last node of the scanned LEB.  */
static void drop_last_node(struct ubifs_scan_leb *sleb, int *offs)
{
	struct ubifs_scan_node *snod;
	if (!list_empty(&sleb->nodes)) {
		snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node,
				  list);
		dbg_rcvry("dropping last node at %d:%d",
			  sleb->lnum, snod->offs);
		*offs = snod->offs;
		list_del(&snod->list);
		kfree(snod);
		sleb->nodes_cnt -= 1;
	}
}