/* clear_active_flags() is a helper for shrink_active_list(), clearing any active bits from the pages in the list.  */
static unsigned long clear_active_flags(struct list_head *page_list, unsigned int *count)
/* clear_active_flags() is a helper for shrink_active_list(), clearing any active bits from the pages in the list.  */
static unsigned long clear_active_flags(struct list_head *page_list, unsigned int *count)
{
	int nr_active = 0;
	int lru;
	struct page *page;
	list_for_each_entry(page, page_list, lru) {
		lru = page_lru_base_type(page);
		if (PageActive(page)) {
			lru += LRU_ACTIVE;
			ClearPageActive(page);
			nr_active++;
		}
		count[lru]++;
	}
	return nr_active;
}