diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-02-10 04:43:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:18 -0500 |
commit | 96177299416dbccb73b54e6b344260154a445375 (patch) | |
tree | 586454851d0fbbb365d6b12c852d5a7dd6b004f4 /include/linux/swap.h | |
parent | 51ed4491271be8c56bdb2a03481ed34ea4984bc2 (diff) |
[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 <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a6..817e1b47007f 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 * | |||
170 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
171 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
172 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
173 | extern unsigned int nr_free_pages(void); | ||
174 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | 173 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); |
175 | extern unsigned int nr_free_buffer_pages(void); | 174 | extern unsigned int nr_free_buffer_pages(void); |
176 | extern unsigned int nr_free_pagecache_pages(void); | 175 | extern unsigned int nr_free_pagecache_pages(void); |
177 | 176 | ||
177 | /* Definition of global_page_state not available yet */ | ||
178 | #define nr_free_pages() global_page_state(NR_FREE_PAGES) | ||
179 | |||
180 | |||
178 | /* linux/mm/swap.c */ | 181 | /* linux/mm/swap.c */ |
179 | extern void FASTCALL(lru_cache_add(struct page *)); | 182 | extern void FASTCALL(lru_cache_add(struct page *)); |
180 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 183 | extern void FASTCALL(lru_cache_add_active(struct page *)); |