diff options
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index acbf31c154f8..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 | /* |
@@ -69,7 +70,7 @@ extern struct page * find_lock_page(struct address_space *mapping, | |||
69 | extern struct page * find_trylock_page(struct address_space *mapping, | 70 | extern struct page * find_trylock_page(struct address_space *mapping, |
70 | unsigned long index); | 71 | unsigned long index); |
71 | extern struct page * find_or_create_page(struct address_space *mapping, | 72 | extern struct page * find_or_create_page(struct address_space *mapping, |
72 | unsigned long index, unsigned int gfp_mask); | 73 | unsigned long index, gfp_t gfp_mask); |
73 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 74 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
74 | unsigned int nr_pages, struct page **pages); | 75 | unsigned int nr_pages, struct page **pages); |
75 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | 76 | unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, |
@@ -92,9 +93,9 @@ extern int read_cache_pages(struct address_space *mapping, | |||
92 | struct list_head *pages, filler_t *filler, void *data); | 93 | struct list_head *pages, filler_t *filler, void *data); |
93 | 94 | ||
94 | int add_to_page_cache(struct page *page, struct address_space *mapping, | 95 | int add_to_page_cache(struct page *page, struct address_space *mapping, |
95 | unsigned long index, int gfp_mask); | 96 | unsigned long index, gfp_t gfp_mask); |
96 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | 97 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, |
97 | unsigned long index, int gfp_mask); | 98 | unsigned long index, gfp_t gfp_mask); |
98 | extern void remove_from_page_cache(struct page *page); | 99 | extern void remove_from_page_cache(struct page *page); |
99 | extern void __remove_from_page_cache(struct page *page); | 100 | extern void __remove_from_page_cache(struct page *page); |
100 | 101 | ||