summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nfs/ChangeLog5
-rw-r--r--nfs/ops.c2
-rw-r--r--nfs/pager.c3
3 files changed, 8 insertions, 2 deletions
diff --git a/nfs/ChangeLog b/nfs/ChangeLog
index bbea0bc1..9905bb06 100644
--- a/nfs/ChangeLog
+++ b/nfs/ChangeLog
@@ -2,6 +2,11 @@
* nfs.h: Add #include <sys/mman.h> for munmap decl.
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * ops.c (netfs_get_dirents): Use mmap instead of vm_allocate.
+ * pager.c (pager_read_page): Likewise.
+
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* ops.c (netfs_get_dirents): Use munmap instead of vm_deallocate.
diff --git a/nfs/ops.c b/nfs/ops.c
index 5e125033..c8e7615b 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -1658,7 +1658,7 @@ netfs_get_dirents (struct iouser *cred, struct node *np,
else
allocsize = round_page (bufsiz);
if (allocsize > *datacnt)
- vm_allocate (mach_task_self (), (vm_address_t *)data, allocsize, 1);
+ *data = mmap (0, allocsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
/* Skip ahead to the correct entry. */
bp = buf;
diff --git a/nfs/pager.c b/nfs/pager.c
index 7a333252..92df7955 100644
--- a/nfs/pager.c
+++ b/nfs/pager.c
@@ -118,7 +118,8 @@ pager_read_page (struct user_pager_info *pager,
mutex_lock (&np->lock);
- vm_allocate (mach_task_self (), buf, vm_page_size, 1);
+ *buf = (vm_address_t) mmap (0, vm_page_size, PROT_READ|PROT_WRITE,
+ MAP_ANON, 0, 0);
data = (char *) *buf;
amt = vm_page_size;
offset = page;