If we intend to make the page writable without requiring another fault,

make sure that PG_NOSYNC is properly set.  Previously we only set it
for a write-fault, but this can occur on a read-fault too.
(will be MFCd prior to 4.3 freeze)
This commit is contained in:
dillon 2001-02-28 04:26:43 +00:00
parent f1c1ec2bab
commit 86a16a841c

View File

@ -795,14 +795,14 @@ RetryFault:;
* Also tell the backing pager, if any, that it should remove
* any swap backing since the page is now dirty.
*/
if (fs.entry->eflags & MAP_ENTRY_NOSYNC) {
if (fs.m->dirty == 0)
vm_page_flag_set(fs.m, PG_NOSYNC);
} else {
vm_page_flag_clear(fs.m, PG_NOSYNC);
}
if (fault_flags & VM_FAULT_DIRTY) {
int s;
if (fs.entry->eflags & MAP_ENTRY_NOSYNC) {
if (fs.m->dirty == 0)
vm_page_flag_set(fs.m, PG_NOSYNC);
} else {
vm_page_flag_clear(fs.m, PG_NOSYNC);
}
vm_page_dirty(fs.m);
s = splvm();
vm_pager_page_unswapped(fs.m);