aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-07-31 19:41:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 21:42:40 -0400
commitdeaf386ee58d5336bbef8959bf304573afb67c20 (patch)
tree1db62fec3c1cc4f99e8f8539e7aec8225ea9e1f0 /mm/page_alloc.c
parent44de9d0cad41f2c51ef26916842be046b582dcc9 (diff)
mm/buddy: cleanup on should_fail_alloc_page
Currently, function should_fail() has "bool" for its return value, so it's reasonable to change the return value of function should_fail_alloc_page() into "bool" as well. The patch does cleanup on function should_fail_alloc_page() to have "bool" for its return value. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4a4f9219683f..80ef99234b89 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1529,16 +1529,16 @@ static int __init setup_fail_page_alloc(char *str)
1529} 1529}
1530__setup("fail_page_alloc=", setup_fail_page_alloc); 1530__setup("fail_page_alloc=", setup_fail_page_alloc);
1531 1531
1532static int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) 1532static bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
1533{ 1533{
1534 if (order < fail_page_alloc.min_order) 1534 if (order < fail_page_alloc.min_order)
1535 return 0; 1535 return false;
1536 if (gfp_mask & __GFP_NOFAIL) 1536 if (gfp_mask & __GFP_NOFAIL)
1537 return 0; 1537 return false;
1538 if (fail_page_alloc.ignore_gfp_highmem && (gfp_mask & __GFP_HIGHMEM)) 1538 if (fail_page_alloc.ignore_gfp_highmem && (gfp_mask & __GFP_HIGHMEM))
1539 return 0; 1539 return false;
1540 if (fail_page_alloc.ignore_gfp_wait && (gfp_mask & __GFP_WAIT)) 1540 if (fail_page_alloc.ignore_gfp_wait && (gfp_mask & __GFP_WAIT))
1541 return 0; 1541 return false;
1542 1542
1543 return should_fail(&fail_page_alloc.attr, 1 << order); 1543 return should_fail(&fail_page_alloc.attr, 1 << order);
1544} 1544}
@@ -1578,9 +1578,9 @@ late_initcall(fail_page_alloc_debugfs);
1578 1578
1579#else /* CONFIG_FAIL_PAGE_ALLOC */ 1579#else /* CONFIG_FAIL_PAGE_ALLOC */
1580 1580
1581static inline int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) 1581static inline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
1582{ 1582{
1583 return 0; 1583 return false;
1584} 1584}
1585 1585
1586#endif /* CONFIG_FAIL_PAGE_ALLOC */ 1586#endif /* CONFIG_FAIL_PAGE_ALLOC */