summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-07 20:38:55 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-07 20:38:55 -0700
commit15e28e8d45273677a31fad76102acc3bc4cf88f6 (patch)
treee73d70761b467d4e3e07398c4697623a11956fea /kernel
parent76a0722ffe4c7b7832ec07f9e9de1c6e58c31d74 (diff)
[PATCH] remove get_free_page()
This used to be a macro wrapper around get_zeroed_page(). It was a dreadful choice of name, because it hid the fact that this function memsets the page. Probably, lots of the callers didn't actually want to do that but this patch does not make such optimisations. At least now, people may spot a `get_zeroed_page' in there and realise that the page doesn't actually need to be initialised. The patch also changes get_zeroed_page() to go BUG if called with __GFP_HIGHMEM. It returns the address of the page's memory and hence can only be used for direct-mapped pages (wli).
Diffstat (limited to 'kernel')
-rw-r--r--kernel/suspend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/suspend.c b/kernel/suspend.c
index 6eec7ed03b07..2aa820a6092b 100644
--- a/kernel/suspend.c
+++ b/kernel/suspend.c
@@ -393,7 +393,7 @@ static int write_suspend_image(void)
int i;
swp_entry_t entry, prev = { 0 };
int nr_pgdir_pages = SUSPEND_PD_PAGES(nr_copy_pages);
- union diskpage *cur, *buffer = (union diskpage *)get_free_page(GFP_ATOMIC);
+ union diskpage *cur, *buffer = (union diskpage *)get_zeroed_page(GFP_ATOMIC);
unsigned long address;
struct page *page;
@@ -554,7 +554,7 @@ static suspend_pagedir_t *create_suspend_pagedir(int nr_copy_pages)
SetPageNosave(page++);
while(nr_copy_pages--) {
- p->address = get_free_page(GFP_ATOMIC);
+ p->address = get_zeroed_page(GFP_ATOMIC);
if(!p->address) {
free_suspend_pagedir((unsigned long) pagedir);
return NULL;
@@ -923,7 +923,7 @@ static int check_pagedir(void)
unsigned long addr;
do {
- addr = get_free_page(GFP_ATOMIC);
+ addr = get_zeroed_page(GFP_ATOMIC);
if(!addr)
return -ENOMEM;
} while (does_collide(addr));
@@ -1139,7 +1139,7 @@ static int read_suspend_image(const char * specialfile, int noresume)
int error;
resume_device = name_to_kdev_t(specialfile);
- scratch_page = get_free_page(GFP_ATOMIC);
+ scratch_page = get_zeroed_page(GFP_ATOMIC);
cur = (void *) scratch_page;
if (cur) {
struct block_device *bdev;