]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Define easier to handle GFP_THISNODE
authorChristoph Lameter <clameter@sgi.com>
Tue, 26 Sep 2006 06:31:46 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:50 +0000 (08:48 -0700)
In many places we will need to use the same combination of flags.  Specify
a single GFP_THISNODE definition for ease of use in gfp.h.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/kernel/uncached.c
include/linux/gfp.h
mm/migrate.c

index f813caa80570901123fe90cd2b5ef6fd882f9b28..c58e933694d5d2724744f2d19d1c05dc1e993b2b 100644 (file)
@@ -98,8 +98,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
 
        /* attempt to allocate a granule's worth of cached memory pages */
 
-       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO |
-                                __GFP_THISNODE | __GFP_NORETRY | __GFP_NOWARN,
+       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
                                IA64_GRANULE_SHIFT-PAGE_SHIFT);
        if (!page) {
                mutex_unlock(&uc_pool->add_chunk_mutex);
index 0eda5b6dedbd4815ecccad542c26ba5ac904c0d6..8b34aabfe4c61129c78e378365372ae6831bc6c8 100644 (file)
@@ -67,6 +67,8 @@ struct vm_area_struct;
 #define GFP_HIGHUSER   (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \
                         __GFP_HIGHMEM)
 
+#define GFP_THISNODE   (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY)
+
 /* Flag - indicates that the buffer will be suitable for DMA.  Ignored on some
    platforms, used as appropriate on others */
 
index 6196f45c52634b0e16b6cfccf72d423538cf0bb1..20a8c2687b1efea5b7bb1ab23d6b9195a2e97453 100644 (file)
@@ -741,9 +741,7 @@ static struct page *new_page_node(struct page *p, unsigned long private,
 
        *result = &pm->status;
 
-       return alloc_pages_node(pm->node,
-               GFP_HIGHUSER | __GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY,
-               0);
+       return alloc_pages_node(pm->node, GFP_HIGHUSER | GFP_THISNODE, 0);
 }
 
 /*