

Allocate shmem directory pages from Normal zone, as the pages are pinned
in process spaces.

FIXME:
	This code is temporary, the base code assumes HighMem is
	hot-pluggable. The pages should be allocated from non hot-pluggable
	zone or non hot-pluggable memory area, not from Normal zone.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/mm/shmem.c |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -puN mm/shmem.c~P25-shmem mm/shmem.c
--- memhotplug/mm/shmem.c~P25-shmem	2004-11-12 16:52:30.000000000 -0800
+++ memhotplug-dave/mm/shmem.c	2004-11-12 16:52:30.000000000 -0800
@@ -93,7 +93,16 @@ static inline struct page *shmem_dir_all
 	 * BLOCKS_PER_PAGE on indirect pages, assume PAGE_CACHE_SIZE:
 	 * might be reconsidered if it ever diverges from PAGE_SIZE.
 	 */
+#ifdef CONFIG_MEMORY_HOTPLUG
+	/*
+	 * XXXX: This is temprary code, which should be replaced with proper one
+	 * 	 after the scheme to specify hot removable region has defined.
+	 *				25/Sep/2004	-- taka
+	 */
+	return alloc_pages(gfp_mask & ~__GFP_HIGHMEM, PAGE_CACHE_SHIFT-PAGE_SHIFT);
+#else
 	return alloc_pages(gfp_mask, PAGE_CACHE_SHIFT-PAGE_SHIFT);
+#endif
 }
 
 static inline void shmem_dir_free(struct page *page)
_
