summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mach-defpager/default_pager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index 4b5aff89..ca53ac6c 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -1056,6 +1056,7 @@ pager_truncate(dpager_t pager, vm_size_t new_size) /* in pages */
}
}
+ mutex_lock(&pager->lock); /* XXX lock_write */
old_size = pager->size;
if (INDIRECT_PAGEMAP(old_size))
@@ -1124,6 +1125,7 @@ pager_truncate(dpager_t pager, vm_size_t new_size) /* in pages */
}
pager->size = new_size;
+ mutex_unlock(&pager->lock);
#ifdef CHECKSUM
#error write me