aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-17 23:24:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:12:57 -0400
commitdcce284a259373f9e5570f2e33f79eca84fcf565 (patch)
treeafc4b23208974f17c080ea3d2ecfbaca4254c010 /include/linux/gfp.h
parent9729a6eb5878a3daa18395f2b5fb38bf9359a761 (diff)
mm: Extend gfp masking to the page allocator
The page allocator also needs the masking of gfp flags during boot, so this moves it out of slab/slub and uses it with the page allocator as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index cfdb35d71bca..7c777a0da17a 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -99,7 +99,7 @@ struct vm_area_struct;
99 __GFP_NORETRY|__GFP_NOMEMALLOC) 99 __GFP_NORETRY|__GFP_NOMEMALLOC)
100 100
101/* Control slab gfp mask during early boot */ 101/* Control slab gfp mask during early boot */
102#define SLAB_GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) 102#define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)
103 103
104/* Control allocation constraints */ 104/* Control allocation constraints */
105#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) 105#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
@@ -348,4 +348,11 @@ static inline void oom_killer_enable(void)
348 oom_killer_disabled = false; 348 oom_killer_disabled = false;
349} 349}
350 350
351extern gfp_t gfp_allowed_mask;
352
353static inline void set_gfp_allowed_mask(gfp_t mask)
354{
355 gfp_allowed_mask = mask;
356}
357
351#endif /* __LINUX_GFP_H */ 358#endif /* __LINUX_GFP_H */