Skip to content

Commit 1e7a818

Browse files
tehcastertorvalds
authored andcommitted
mm, fault-injection: declare should_fail_alloc_page()
The mm/ directory can almost fully be built with W=1, which would help in local development. One remaining issue is missing prototype for should_fail_alloc_page(). Thus add it next to the should_failslab() prototype. Note the previous attempt by commit f717309 ("mm/page_alloc: make should_fail_alloc_page() static") had to be reverted by commit 54aa386 as it caused an unresolved symbol error with CONFIG_DEBUG_INFO_BTF=y Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Vlastimil Babka <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: David Hildenbrand <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent bf6445b commit 1e7a818

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/fault-inject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ static inline struct dentry *fault_create_debugfs_attr(const char *name,
6464

6565
struct kmem_cache;
6666

67+
bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order);
68+
6769
int should_failslab(struct kmem_cache *s, gfp_t gfpflags);
6870
#ifdef CONFIG_FAILSLAB
6971
extern bool __should_failslab(struct kmem_cache *s, gfp_t gfpflags);

0 commit comments

Comments
 (0)