patch-1.3.50 linux/mm/swap.c
Next file: linux/scripts/tkgen.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Fri Dec 22 14:08:18 1995
- Orig file:
v1.3.49/linux/mm/swap.c
- Orig date:
Sun Dec 17 11:43:33 1995
diff -u --recursive --new-file v1.3.49/linux/mm/swap.c linux/mm/swap.c
@@ -479,7 +479,7 @@
vma->vm_mm->rss--;
pte_clear(page_table);
invalidate_page(vma, address);
- entry = mem_map[MAP_NR(page)].count;
+ entry = page_unuse(page);
free_page(page);
return entry;
}
@@ -687,6 +687,10 @@
if (shm_swap(i, limit))
return 1;
state = 2;
+ case 2:
+ if (shrink_mmap(i, limit))
+ return 1;
+ state = 3;
default:
if (swap_out(i, limit))
return 1;
@@ -1324,6 +1328,11 @@
p->count = 0;
p->dirty = 0;
p->reserved = 1;
+ p->inode = NULL;
+ p->offset = 0;
+ p->write_list = NULL;
+ p->next = p->prev = NULL;
+ p->next_hash = p->next_hash = NULL;
}
for (i = 0 ; i < NR_MEM_LISTS ; i++) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this