svn commit: r240989 - stable/9/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Thu Sep 27 09:00:23 UTC 2012
Author: kib
Date: Thu Sep 27 09:00:22 2012
New Revision: 240989
URL: http://svn.freebsd.org/changeset/base/240989
Log:
MFC r240741:
Plug the accounting leak for the wired pages when msync(MS_INVALIDATE)
is performed on the vnode mapping which is wired in other address space.
Modified:
stable/9/sys/vm/vm_object.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/vm/vm_object.c
==============================================================================
--- stable/9/sys/vm/vm_object.c Thu Sep 27 08:24:34 2012 (r240988)
+++ stable/9/sys/vm/vm_object.c Thu Sep 27 09:00:22 2012 (r240989)
@@ -1893,8 +1893,13 @@ again:
if ((options & OBJPR_NOTMAPPED) == 0) {
pmap_remove_all(p);
/* Account for removal of wired mappings. */
- if (wirings != 0)
- p->wire_count -= wirings;
+ if (wirings != 0) {
+ KASSERT(p->wire_count == wirings,
+ ("inconsistent wire count %d %d %p",
+ p->wire_count, wirings, p));
+ p->wire_count = 0;
+ atomic_subtract_int(&cnt.v_wire_count, 1);
+ }
}
vm_page_free(p);
vm_page_unlock(p);
More information about the svn-src-stable-9
mailing list