patch-2.1.127 linux/mm/filemap.c
Next file: linux/mm/memory.c
Previous file: linux/kernel/sysctl.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Tue Nov 3 08:39:50 1998
- Orig file:
v2.1.126/linux/mm/filemap.c
- Orig date:
Fri Oct 23 22:01:27 1998
diff -u --recursive --new-file v2.1.126/linux/mm/filemap.c linux/mm/filemap.c
@@ -293,7 +293,7 @@
struct page **hash)
{
atomic_inc(&page->count);
- page->flags &= ~((1 << PG_uptodate) | (1 << PG_error));
+ page->flags = (page->flags & ~((1 << PG_uptodate) | (1 << PG_error))) | (1 << PG_referenced);
page->offset = offset;
add_page_to_inode_queue(inode, page);
__add_page_to_hash_queue(page, hash);
@@ -314,7 +314,7 @@
offset &= PAGE_MASK;
switch (page_cache) {
case 0:
- page_cache = __get_free_page(GFP_KERNEL);
+ page_cache = __get_free_page(GFP_USER);
if (!page_cache)
break;
default:
@@ -328,7 +328,6 @@
*/
page = mem_map + MAP_NR(page_cache);
add_to_page_cache(page, inode, offset, hash);
- set_bit(PG_referenced, &page->flags);
inode->i_op->readpage(file, page);
page_cache = 0;
}
@@ -737,7 +736,7 @@
* page..
*/
if (!page_cache) {
- page_cache = __get_free_page(GFP_KERNEL);
+ page_cache = __get_free_page(GFP_USER);
/*
* That could have slept, so go around to the
* very beginning..
@@ -1003,7 +1002,7 @@
* extra page -- better to overlap the allocation with the I/O.
*/
if (no_share && !new_page) {
- new_page = __get_free_page(GFP_KERNEL);
+ new_page = __get_free_page(GFP_USER);
if (!new_page)
goto failure;
}
@@ -1040,7 +1039,7 @@
return new_page;
no_cached_page:
- new_page = __get_free_page(GFP_KERNEL);
+ new_page = __get_free_page(GFP_USER);
if (!new_page)
goto no_page;
@@ -1570,7 +1569,7 @@
hash = page_hash(inode, pgpos);
if (!(page = __find_page(inode, pgpos, *hash))) {
if (!page_cache) {
- page_cache = __get_free_page(GFP_KERNEL);
+ page_cache = __get_free_page(GFP_USER);
if (page_cache)
continue;
status = -ENOMEM;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov