#endif /* CONFIG_HIGMEM || WANT_PAGE_VIRTUAL */
};
+/*
+ * FIXME: take this include out, include page-flags.h in
+ * files which need it (119 of them)
+ */
+#include <linux/page-flags.h>
+
/*
* Methods to modify the page usage count.
*
})
#define page_count(p) atomic_read(&(p)->count)
#define set_page_count(p,v) atomic_set(&(p)->count, v)
+
extern void FASTCALL(__page_cache_release(struct page *));
-#define put_page(p) \
- do { \
- if (!PageReserved(p) && put_page_testzero(p)) \
- __page_cache_release(p); \
- } while (0)
void FASTCALL(__free_pages_ok(struct page *page, unsigned int order));
+static inline void put_page(struct page *page)
+{
+ if (!PageReserved(page) && put_page_testzero(page))
+ __page_cache_release(page);
+}
+
/*
* Multiple processes may "see" the same page. E.g. for untouched
* mappings of /dev/null, all processes see the same page full of
* to swap space and (later) to be read back into memory.
*/
-/*
- * FIXME: take this include out, include page-flags.h in
- * files which need it (119 of them)
- */
-#include <linux/page-flags.h>
-
/*
* The zone field is never updated after free_area_init_core()
* sets it, so none of the operations on it need to be atomic.
#define PAGE_CACHE_MASK PAGE_MASK
#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
-#define page_cache_get(x) get_page(x)
-
-static inline void page_cache_release(struct page *page)
-{
- if (!PageReserved(page) && put_page_testzero(page))
- __page_cache_release(page);
-}
+#define page_cache_get(page) get_page(page)
+#define page_cache_release(page) put_page(page)
static inline struct page *page_cache_alloc(struct address_space *x)
{