Skip to contentSkip to conversation

fault-injection capability for alloc_pages() [bug fix]

PATCH Don Mullis 1 participant 1 message Sep 6, 2006

Subsystems (2)
lore
Share & tools
lore

Don Mullis

author
#0 lore raw

Fix compilation when CONFIG_FAIL_PAGE_ALLOC=n

---
 mm/page_alloc.c |    2 ++
 1 file changed, 2 insertions(+)
mm/page_alloc.c +2 -0
Index: linux-2.6.17/mm/page_alloc.c
===================================================================
@@ -938,9 +938,11 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
 
 	might_sleep_if(wait);
 
+#ifdef CONFIG_FAIL_PAGE_ALLOC
 	if (!(gfp_mask & __GFP_NOFAIL) &&
 	    should_fail(fail_page_alloc, 1 << order))
 		return NULL;
+#endif
 
 restart:
 	z = zonelist->zones;  /* the list of zones suitable for gfp_mask */