summaryrefslogtreecommitdiff
path: root/isofs
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:28 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:28 +0000
commit6ae05c477f2d8931fc365f6f009817e6c26087fd (patch)
treeea4e8aa6f9cca708d8b8cf1d9130f53e5d09d2c9 /isofs
parentc34fe8e00d5b049550f462155238d6e31e08b234 (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* lookup.c (diskfs_get_directs): Use mmap instead of vm_allocate. * pager.c (pager_read_page): Likewise.
Diffstat (limited to 'isofs')
-rw-r--r--isofs/ChangeLog5
-rw-r--r--isofs/lookup.c2
-rw-r--r--isofs/pager.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/isofs/ChangeLog b/isofs/ChangeLog
index 535c857d..a97049dd 100644
--- a/isofs/ChangeLog
+++ b/isofs/ChangeLog
@@ -1,6 +1,11 @@
1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
* isofs.h: Add #include <sys/mman.h> for munmap decl.
+
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * lookup.c (diskfs_get_directs): Use mmap instead of vm_allocate.
+ * pager.c (pager_read_page): Likewise.
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
diff --git a/isofs/lookup.c b/isofs/lookup.c
index b33dab00..2e3465b9 100644
--- a/isofs/lookup.c
+++ b/isofs/lookup.c
@@ -233,7 +233,7 @@ diskfs_get_directs (struct node *dp,
allocsize = bufsiz ? round_page (bufsiz) : vm_page_size * 4;
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);
ouralloc = 1;
}
diff --git a/isofs/pager.c b/isofs/pager.c
index 3ebcc7e8..7e12ebc0 100644
--- a/isofs/pager.c
+++ b/isofs/pager.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
Written by Thomas Bushnell, n/BSG.
This file is part of the GNU Hurd.
@@ -52,7 +52,8 @@ pager_read_page (struct user_pager_info *upi,
if (page >= np->dn_stat.st_size)
{
- 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);
return 0;
}