]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/pagemap.h
Merge branch 'halasa-hdlc' of git://git.tuxdriver.com/git/netdev-jwl
[linux-2.6-omap-h63xx.git] / include / linux / pagemap.h
index efbae53fb07818b8ed13f08a80a103e9689905e3..ee700c6eb4427f5582438aaf9f861c134f626a41 100644 (file)
 
 static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
 {
-       return mapping->flags & __GFP_BITS_MASK;
+       return (__force gfp_t)mapping->flags & __GFP_BITS_MASK;
 }
 
 /*
  * This is non-atomic.  Only to be used before the mapping is activated.
  * Probably needs a barrier...
  */
-static inline void mapping_set_gfp_mask(struct address_space *m, int mask)
+static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
 {
-       m->flags = (m->flags & ~__GFP_BITS_MASK) | mask;
+       m->flags = (m->flags & ~(__force unsigned long)__GFP_BITS_MASK) |
+                               (__force unsigned long)mask;
 }
 
 /*
@@ -52,12 +53,12 @@ void release_pages(struct page **pages, int nr, int cold);
 
 static inline struct page *page_cache_alloc(struct address_space *x)
 {
-       return alloc_pages(mapping_gfp_mask(x)|__GFP_NORECLAIM, 0);
+       return alloc_pages(mapping_gfp_mask(x), 0);
 }
 
 static inline struct page *page_cache_alloc_cold(struct address_space *x)
 {
-       return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD|__GFP_NORECLAIM, 0);
+       return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0);
 }
 
 typedef int filler_t(void *, struct page *);