Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[linux-2.6-microblaze.git] / mm / page_alloc.c
index 519a60d..ef5070f 100644 (file)
@@ -5137,8 +5137,9 @@ void __page_frag_cache_drain(struct page *page, unsigned int count)
 }
 EXPORT_SYMBOL(__page_frag_cache_drain);
 
-void *page_frag_alloc(struct page_frag_cache *nc,
-                     unsigned int fragsz, gfp_t gfp_mask)
+void *page_frag_alloc_align(struct page_frag_cache *nc,
+                     unsigned int fragsz, gfp_t gfp_mask,
+                     unsigned int align_mask)
 {
        unsigned int size = PAGE_SIZE;
        struct page *page;
@@ -5190,11 +5191,12 @@ refill:
        }
 
        nc->pagecnt_bias--;
+       offset &= align_mask;
        nc->offset = offset;
 
        return nc->va + offset;
 }
-EXPORT_SYMBOL(page_frag_alloc);
+EXPORT_SYMBOL(page_frag_alloc_align);
 
 /*
  * Frees a page fragment allocated out of either a compound or order 0 page.