Page MenuHomeFreeBSD

D46943.id.diff
No OneTemporary

D46943.id.diff

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2097,7 +2097,7 @@
* Attempt to reserve the pages. Fail if we're below the limit.
*/
limit += npages;
- old = vmd->vmd_free_count;
+ old = atomic_load_int(&vmd->vmd_free_count);
do {
if (old < limit)
return (0);
@@ -4238,7 +4238,7 @@
{
u_int old;
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(old > 0,
("vm_page_wire_mapped: wiring unreferenced page %p", m));
@@ -4272,7 +4272,7 @@
* Use a release store when updating the reference count to
* synchronize with vm_page_free_prep().
*/
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(VPRC_WIRE_COUNT(old) > 0,
("vm_page_unwire: wire count underflow for page %p", m));
@@ -4567,7 +4567,7 @@
("vm_page_try_blocked_op: page %p is not busy", m));
VM_OBJECT_ASSERT_LOCKED(m->object);
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(old != 0,
("vm_page_try_blocked_op: page %p has no references", m));

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 5, 10:14 PM (18 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13651774
Default Alt Text
D46943.id.diff (1 KB)

Event Timeline