summaryrefslogtreecommitdiffstats
path: root/sys/vm/vnode_pager.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-06-16 18:56:19 +0000
committeralc <alc@FreeBSD.org>2012-06-16 18:56:19 +0000
commit6eeaee04e4175a3faa0ce3f7778a3abce0d8d9a2 (patch)
treeebf0376a21131a0f41835773afe0ddda56d3efbe /sys/vm/vnode_pager.c
parentca31dfb2b475f8026e45a8b10673993068ebc000 (diff)
downloadFreeBSD-src-6eeaee04e4175a3faa0ce3f7778a3abce0d8d9a2.zip
FreeBSD-src-6eeaee04e4175a3faa0ce3f7778a3abce0d8d9a2.tar.gz
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap
layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer. Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer. As an added bonus, tidy up some nearby comments concerning page flags. Reviewed by: kib MFC after: 6 weeks
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r--sys/vm/vnode_pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index c8c57e1..aae0777 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -1146,7 +1146,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
m = ma[ncount - 1];
KASSERT(m->busy > 0,
("vnode_pager_generic_putpages: page %p is not busy", m));
- KASSERT((m->aflags & PGA_WRITEABLE) == 0,
+ KASSERT(!pmap_page_is_write_mapped(m),
("vnode_pager_generic_putpages: page %p is not read-only", m));
vm_page_clear_dirty(m, pgoff, PAGE_SIZE -
pgoff);
OpenPOWER on IntegriCloud