mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 23:19:00 +00:00
Fixed bug where page modifications would be lost when swap space was
almost depleted. Reviewed by: John Dyson
This commit is contained in:
parent
defb6744ba
commit
2e1e24dd28
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3573
@ -39,7 +39,7 @@
|
||||
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
* $Id: swap_pager.c,v 1.10 1994/10/09 01:52:04 phk Exp $
|
||||
* $Id: swap_pager.c,v 1.11 1994/10/09 07:35:16 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1162,7 +1162,16 @@ swap_pager_input(swp, m, count, reqpage)
|
||||
PAGE_WAKEUP(m[i]);
|
||||
}
|
||||
}
|
||||
if( swap_pager_full) {
|
||||
/*
|
||||
* If we're out of swap space, then attempt to free
|
||||
* some whenever pages are brought in. We must clear
|
||||
* the clean flag so that the page contents will be
|
||||
* preserved.
|
||||
*/
|
||||
if (swap_pager_full) {
|
||||
for (i = 0; i < count; i++) {
|
||||
m[i]->flags &= ~PG_CLEAN;
|
||||
}
|
||||
_swap_pager_freespace( swp, m[0]->offset+paging_offset, count*PAGE_SIZE);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user