Author: kib
Date: Thu Jun  3 10:11:45 2010
New Revision: 208772
URL: http://svn.freebsd.org/changeset/base/208772

Log:
  Add assertion and comment in vm_page_flag_set() describing the expectations
  when the PG_WRITEABLE flag is set.
  
  Reviewed by:  alc

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c       Thu Jun  3 09:54:53 2010        (r208771)
+++ head/sys/vm/vm_page.c       Thu Jun  3 10:11:45 2010        (r208772)
@@ -486,6 +486,14 @@ vm_page_flag_set(vm_page_t m, unsigned s
 {
 
        mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+       /*
+        * For a managed page, the PG_WRITEABLE flag can be set only if
+        * the page is VPO_BUSY.  Currently this flag is only set by
+        * pmap_enter().
+        */
+       KASSERT((bits & PG_WRITEABLE) == 0 ||
+           (m->flags & (PG_UNMANAGED | PG_FICTITIOUS)) != 0 ||
+           (m->oflags & VPO_BUSY) != 0, ("PG_WRITEABLE and !VPO_BUSY"));
        m->flags |= bits;
 } 
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to