From 96177299416dbccb73b54e6b344260154a445375 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sat, 10 Feb 2007 01:43:03 -0800 Subject: [PATCH] Drop free_pages() nr_free_pages is now a simple access to a global variable. Make it a macro instead of a function. The nr_free_pages now requires vmstat.h to be included. There is one occurrence in power management where we need to add the include. Directly refrer to global_page_state() there to clarify why the #include was added. [akpm@osdl.org: arm build fix] [akpm@osdl.org: sparc64 build fix] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/swap.h | 5 ++++- include/linux/vmstat.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a..817e1b47007 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -170,11 +170,14 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * extern unsigned long totalram_pages; extern unsigned long totalreserve_pages; extern long nr_swap_pages; -extern unsigned int nr_free_pages(void); extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); extern unsigned int nr_free_buffer_pages(void); extern unsigned int nr_free_pagecache_pages(void); +/* Definition of global_page_state not available yet */ +#define nr_free_pages() global_page_state(NR_FREE_PAGES) + + /* linux/mm/swap.c */ extern void FASTCALL(lru_cache_add(struct page *)); extern void FASTCALL(lru_cache_add_active(struct page *)); diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index c8d55bcc09b..77caf911969 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -3,6 +3,7 @@ #include #include +#include #include #include -- cgit v1.2.3