/* Don't call cpuset_update_task_memory_state() unless 1) it's ok to take cpuset_sem (can WAIT), and 2) allocating for current task (not interrupt).  */
struct page* alloc_pages_current(gfp_t gfp, unsigned order)
/* Don't call cpuset_update_task_memory_state() unless 1) it's ok to take cpuset_sem (can WAIT), and 2) allocating for current task (not interrupt).  */
struct page* alloc_pages_current(gfp_t gfp, unsigned order)
{
	struct mempolicy *pol = current->mempolicy;
	if (!pol || in_interrupt() || (gfp & __GFP_THISNODE))
		pol = &default_policy;
	if (pol->mode == MPOL_INTERLEAVE)
		return alloc_page_interleave(gfp, order, interleave_nodes(pol));
	return __alloc_pages_nodemask(gfp, order,
			policy_zonelist(gfp, pol), policy_nodemask(gfp, pol));
}