summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pageout.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-09-15 18:30:28 +0000
committeralc <alc@FreeBSD.org>2007-09-15 18:30:28 +0000
commit0188378655831f69b6dfe72c699ed262ae4d42f3 (patch)
treecad72c063a8bcbc0a9c598a2860cc520aec57389 /sys/vm/vm_pageout.c
parentaf406864eea90a3bfd45e627c9e3e663a5b1b176 (diff)
downloadFreeBSD-src-0188378655831f69b6dfe72c699ed262ae4d42f3.zip
FreeBSD-src-0188378655831f69b6dfe72c699ed262ae4d42f3.tar.gz
Correct an assertion in vm_pageout_flush(). Specifically, if a page's
status after vm_pager_put_pages() is VM_PAGER_PEND, then it could have already been recycled, i.e., freed and reallocated to a new purpose; thus, asserting that such pages cannot be written is inappropriate. Reported by: kris Submitted by: tegge Approved by: re (kensmith) MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r--sys/vm/vm_pageout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index c46bfe3..7bea8da 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -447,7 +447,8 @@ vm_pageout_flush(vm_page_t *mc, int count, int flags)
for (i = 0; i < count; i++) {
vm_page_t mt = mc[i];
- KASSERT((mt->flags & PG_WRITEABLE) == 0,
+ KASSERT(pageout_status[i] == VM_PAGER_PEND ||
+ (mt->flags & PG_WRITEABLE) == 0,
("vm_pageout_flush: page %p is not write protected", mt));
switch (pageout_status[i]) {
case VM_PAGER_OK:
OpenPOWER on IntegriCloud