Commit 980128f2 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

[PATCH] Define easier to handle GFP_THISNODE



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: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fbd98167
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
+2 −0
Original line number Diff line number Diff line
@@ -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 */

+1 −3
Original line number Diff line number Diff line
@@ -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);
}

/*