/* Are there way too many processes in the direct reclaim path already?  */
static int too_many_isolated(struct zone *zone, int file, struct scan_control *sc)
/* Are there way too many processes in the direct reclaim path already?  */
static int too_many_isolated(struct zone *zone, int file, struct scan_control *sc)
{
	unsigned long inactive, isolated;
	if (current_is_kswapd())
		return 0;
	if (!scanning_global_lru(sc))
		return 0;
	if (file) {
		inactive = zone_page_state(zone, NR_INACTIVE_FILE);
		isolated = zone_page_state(zone, NR_ISOLATED_FILE);
	} else {
		inactive = zone_page_state(zone, NR_INACTIVE_ANON);
		isolated = zone_page_state(zone, NR_ISOLATED_ANON);
	}
	return isolated > inactive;
}