/* Should be called with the mm_sem of the vma hold.  */
struct page* alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
/* Should be called with the mm_sem of the vma hold.  */
struct page* alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
{
	struct mempolicy *pol = get_vma_policy(current, vma, addr);
	struct zonelist *zl;
	if (unlikely(pol->mode == MPOL_INTERLEAVE)) {
		unsigned nid;
		nid = interleave_nid(pol, vma, addr, PAGE_SHIFT);
		mpol_cond_put(pol);
		return alloc_page_interleave(gfp, 0, nid);
	}
	zl = policy_zonelist(gfp, pol);
	if (unlikely(mpol_needs_cond_ref(pol))) {
		struct page *page =  __alloc_pages_nodemask(gfp, 0,
						zl, policy_nodemask(gfp, pol));
		__mpol_put(pol);
		return page;
	}
	return __alloc_pages_nodemask(gfp, 0, zl, policy_nodemask(gfp, pol));
}