diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2005-10-21 03:22:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 11:16:51 -0400 |
commit | 260b23674fdb570f3235ce55892246bef1c24c2a (patch) | |
tree | 471e7b546cbf1f7ee4a165e5bd9a2de0770e53be /include/linux | |
parent | c4cdd038318863e912e9b992489f61497f98b442 (diff) |
[PATCH] gfp_t: the rest
zone handling, mapping->flags handling
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mmzone.h | 2 | ||||
-rw-r--r-- | include/linux/pagemap.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 5ed471b58f4f..7519eb4191e7 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -302,7 +302,7 @@ void get_zone_counts(unsigned long *active, unsigned long *inactive, | |||
302 | void build_all_zonelists(void); | 302 | void build_all_zonelists(void); |
303 | void wakeup_kswapd(struct zone *zone, int order); | 303 | void wakeup_kswapd(struct zone *zone, int order); |
304 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 304 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
305 | int alloc_type, int can_try_harder, int gfp_high); | 305 | int alloc_type, int can_try_harder, gfp_t gfp_high); |
306 | 306 | ||
307 | #ifdef CONFIG_HAVE_MEMORY_PRESENT | 307 | #ifdef CONFIG_HAVE_MEMORY_PRESENT |
308 | void memory_present(int nid, unsigned long start, unsigned long end); | 308 | void memory_present(int nid, unsigned long start, unsigned long end); |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index efbae53fb078..ba6c310a055f 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -21,16 +21,17 @@ | |||
21 | 21 | ||
22 | static inline gfp_t mapping_gfp_mask(struct address_space * mapping) | 22 | static inline gfp_t mapping_gfp_mask(struct address_space * mapping) |
23 | { | 23 | { |
24 | return mapping->flags & __GFP_BITS_MASK; | 24 | return (__force gfp_t)mapping->flags & __GFP_BITS_MASK; |
25 | } | 25 | } |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * This is non-atomic. Only to be used before the mapping is activated. | 28 | * This is non-atomic. Only to be used before the mapping is activated. |
29 | * Probably needs a barrier... | 29 | * Probably needs a barrier... |
30 | */ | 30 | */ |
31 | static inline void mapping_set_gfp_mask(struct address_space *m, int mask) | 31 | static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) |
32 | { | 32 | { |
33 | m->flags = (m->flags & ~__GFP_BITS_MASK) | mask; | 33 | m->flags = (m->flags & ~(__force unsigned long)__GFP_BITS_MASK) | |
34 | (__force unsigned long)mask; | ||
34 | } | 35 | } |
35 | 36 | ||
36 | /* | 37 | /* |