aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.22-sparse/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'xenolinux-2.4.22-sparse/mm/memory.c')
-rw-r--r--xenolinux-2.4.22-sparse/mm/memory.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xenolinux-2.4.22-sparse/mm/memory.c b/xenolinux-2.4.22-sparse/mm/memory.c
index 0fdc801c0b..dc09253985 100644
--- a/xenolinux-2.4.22-sparse/mm/memory.c
+++ b/xenolinux-2.4.22-sparse/mm/memory.c
@@ -1326,7 +1326,8 @@ static int do_no_page(struct mm_struct * mm, struct vm_area_struct * vma,
*/
/* Only go through if we didn't race with anybody else... */
if (pte_none(*page_table)) {
- ++mm->rss;
+ if (!PageReserved(new_page))
+ ++mm->rss;
flush_page_to_ram(new_page);
flush_icache_page(vma, new_page);
entry = mk_pte(new_page, vma->vm_page_prot);
@@ -1463,6 +1464,7 @@ pmd_t *__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
*/
if (!pgd_none(*pgd)) {
pmd_free(new);
+ check_pgt_cache();
goto out;
}
}
@@ -1498,6 +1500,7 @@ pte_t *pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address)
*/
if (!pmd_none(*pmd)) {
pte_free(new);
+ check_pgt_cache();
goto out;
}
}