patch-2.4.7 linux/mm/filemap.c
Next file: linux/mm/memory.c
Previous file: linux/mm/Makefile
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Wed Jul 11 14:52:58 2001
- Orig file:
v2.4.6/linux/mm/filemap.c
- Orig date:
Tue Jul 3 17:08:22 2001
diff -u --recursive --new-file v2.4.6/linux/mm/filemap.c linux/mm/filemap.c
@@ -760,7 +760,7 @@
lock_page(page);
/* Is the page still hashed? Ok, good.. */
- if (page->mapping)
+ if (page->mapping == mapping && page->index == offset)
return page;
/* Nope: we raced. Release and try again.. */
@@ -1649,10 +1649,13 @@
{
pte_t pte = *ptep;
- if (pte_present(pte) && ptep_test_and_clear_dirty(ptep)) {
+ if (pte_present(pte)) {
struct page *page = pte_page(pte);
- flush_tlb_page(vma, address);
- set_page_dirty(page);
+ if (VALID_PAGE(page) && !PageReserved(page) && ptep_test_and_clear_dirty(ptep)) {
+ flush_tlb_page(vma, address);
+ if (page->mapping)
+ set_page_dirty(page);
+ }
}
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)