1 Index: linux-2.4.21-suse2/mm/filemap.c
2 ===================================================================
3 --- linux-2.4.21-suse2.orig/mm/filemap.c 2005-04-04 05:58:21.000000000 -0600
4 +++ linux-2.4.21-suse2/mm/filemap.c 2005-04-04 06:18:57.000000000 -0600
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.21-suse2/mm/page_alloc.c
30 ===================================================================
31 --- linux-2.4.21-suse2.orig/mm/page_alloc.c 2005-04-04 05:58:04.000000000 -0600
32 +++ linux-2.4.21-suse2/mm/page_alloc.c 2005-04-04 06:12:11.000000000 -0600
36 min = z->watermarks[class_idx].min;
37 - if (!(gfp_mask & __GFP_WAIT))
38 + if (!(gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_HIGH))
40 else if (current->rt_priority)
46 + if (!(gfp_mask & __GFP_NOWARN))
47 printk(KERN_NOTICE "__alloc_pages: %u-order allocation failed (gfp=0x%x/%i)\n",
48 order, gfp_mask, !!(current->flags & PF_MEMALLOC));
49 if (unlikely(vm_gfp_debug))
50 Index: linux-2.4.21-suse2/kernel/ksyms.c
51 ===================================================================
52 --- linux-2.4.21-suse2.orig/kernel/ksyms.c 2005-04-04 06:01:39.000000000 -0600
53 +++ linux-2.4.21-suse2/kernel/ksyms.c 2005-04-04 06:01:43.000000000 -0600
55 EXPORT_SYMBOL(__find_lock_page);
56 EXPORT_SYMBOL(find_or_create_page);
57 EXPORT_SYMBOL(grab_cache_page_nowait);
58 +EXPORT_SYMBOL(grab_cache_page_nowait_gfp);
59 EXPORT_SYMBOL(read_cache_page);
60 EXPORT_SYMBOL(set_page_dirty);
61 EXPORT_SYMBOL(vfs_readlink);
62 Index: linux-2.4.21-suse2/include/linux/pagemap.h
63 ===================================================================
64 --- linux-2.4.21-suse2.orig/include/linux/pagemap.h 2003-11-10 17:44:33.000000000 -0700
65 +++ linux-2.4.21-suse2/include/linux/pagemap.h 2005-04-04 06:01:43.000000000 -0600
69 extern struct page * grab_cache_page_nowait (struct address_space *, unsigned long);
70 +extern struct page * grab_cache_page_nowait_gfp (struct address_space *, unsigned long, unsigned int);
72 typedef int filler_t(void *, struct page*);
74 Index: linux-2.4.21-suse2/include/linux/mm.h
75 ===================================================================
76 --- linux-2.4.21-suse2.orig/include/linux/mm.h 2005-04-04 05:58:14.000000000 -0600
77 +++ linux-2.4.21-suse2/include/linux/mm.h 2005-04-04 06:17:10.000000000 -0600
79 #define __GFP_IO 0x40 /* Can start low memory physical IO? */
80 #define __GFP_HIGHIO 0x80 /* Can start high mem physical IO? */
81 #define __GFP_FS 0x100 /* Can call down to low-level FS? */
82 +#define __GFP_NOWARN 0x200 /* Don't warn on allocation failure */
84 #define GFP_NOHIGHIO (__GFP_HIGH | __GFP_WAIT | __GFP_IO)
85 #define GFP_NOIO (__GFP_HIGH | __GFP_WAIT)