/* This function returns a code that indicates whether the scan should continue (LPT_SCAN_CONTINUE), whether the LEB properties should be added to the tree in main memory (LPT_SCAN_ADD), or whether the scan should stop (LPT_SCAN_STOP).  */
static int scan_dirty_idx_cb(struct ubifs_info *c, const struct ubifs_lprops *lprops, int in_tree, struct scan_data *data)
/* This function returns a code that indicates whether the scan should continue (LPT_SCAN_CONTINUE), whether the LEB properties should be added to the tree in main memory (LPT_SCAN_ADD), or whether the scan should stop (LPT_SCAN_STOP).  */
static int scan_dirty_idx_cb(struct ubifs_info *c, const struct ubifs_lprops *lprops, int in_tree, struct scan_data *data)
{
	int ret = LPT_SCAN_CONTINUE;
	if (lprops->flags & LPROPS_TAKEN)
		return LPT_SCAN_CONTINUE;
	if (!in_tree && valuable(c, lprops))
		ret |= LPT_SCAN_ADD;
	if (!(lprops->flags & LPROPS_INDEX))
		return ret;
	if (lprops->free + lprops->dirty < c->min_idx_node_sz)
		return ret;
	data->lnum = lprops->lnum;
	return LPT_SCAN_ADD | LPT_SCAN_STOP;
}