1 Index: linux-2.4.20/mm/filemap.c
2 ===================================================================
3 --- linux-2.4.20.orig/mm/filemap.c 2004-12-17 17:51:44.000000000 -0500
4 +++ linux-2.4.20/mm/filemap.c 2004-12-17 17:56:54.000000000 -0500
7 struct page *grab_cache_page_nowait(struct address_space *mapping, unsigned long index)
9 + return grab_cache_page_nowait_gfp(mapping, index, mapping->gfp_mask);
13 +struct page *grab_cache_page_nowait_gfp(struct address_space *mapping,
14 + unsigned long index,
15 + unsigned int gfp_mask)
17 struct page *page, **hash;
19 hash = page_hash(mapping, index);
24 - page = page_cache_alloc(mapping);
25 + page = alloc_pages(gfp_mask, 0);
26 if ( unlikely(!page) )
27 return NULL; /* Failed to allocate a page */
29 Index: linux-2.4.20/mm/page_alloc.c
30 ===================================================================
31 --- linux-2.4.20.orig/mm/page_alloc.c 2004-12-17 17:51:30.000000000 -0500
32 +++ linux-2.4.20/mm/page_alloc.c 2004-12-17 18:26:45.000000000 -0500
37 + } else if (!(gfp_mask & __GFP_HIGH)) {
42 Index: linux-2.4.20/kernel/ksyms.c
43 ===================================================================
44 --- linux-2.4.20.orig/kernel/ksyms.c 2004-12-17 17:51:46.000000000 -0500
45 +++ linux-2.4.20/kernel/ksyms.c 2004-12-17 17:52:59.000000000 -0500
47 EXPORT_SYMBOL(__find_lock_page);
48 EXPORT_SYMBOL(find_or_create_page);
49 EXPORT_SYMBOL(grab_cache_page_nowait);
50 +EXPORT_SYMBOL(grab_cache_page_nowait_gfp);
51 EXPORT_SYMBOL(read_cache_page);
52 EXPORT_SYMBOL(set_page_dirty);
53 EXPORT_SYMBOL(vfs_readlink);
54 Index: linux-2.4.20/include/linux/pagemap.h
55 ===================================================================
56 --- linux-2.4.20.orig/include/linux/pagemap.h 2004-05-27 14:25:05.000000000 -0400
57 +++ linux-2.4.20/include/linux/pagemap.h 2004-12-17 18:11:09.000000000 -0500
61 extern struct page * grab_cache_page_nowait (struct address_space *, unsigned long);
62 +extern struct page * grab_cache_page_nowait_gfp (struct address_space *, unsigned long, unsigned int);
64 typedef int filler_t(void *, struct page*);