summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storeio/ChangeLog7
-rw-r--r--storeio/dev.c11
-rw-r--r--storeio/pager.c2
3 files changed, 12 insertions, 8 deletions
diff --git a/storeio/ChangeLog b/storeio/ChangeLog
index dee2297d..e24ef633 100644
--- a/storeio/ChangeLog
+++ b/storeio/ChangeLog
@@ -1,3 +1,10 @@
+1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * dev.c (dev_buf_fill): Use munmap instead of vm_deallocate.
+ (dev_close): Likewise.
+ (dev_read): Likewise.
+ * pager.c (pager_write_page): Likewise.
+
1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
* storeio.c (check_open_hook): Translate D_NO_SUCH_DEVICE to ENXIO.
diff --git a/storeio/dev.c b/storeio/dev.c
index 30828556..cab344c1 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -88,8 +88,7 @@ dev_buf_fill (struct dev *dev, off_t offs)
if (buf != dev->buf)
{
- vm_deallocate (mach_task_self (),
- (vm_address_t)dev->buf, store->block_size);
+ munmap (dev->buf, store->block_size);
dev->buf = buf;
}
@@ -188,8 +187,7 @@ dev_close (struct dev *dev)
dev_buf_discard (dev);
- vm_deallocate (mach_task_self (),
- (vm_address_t)dev->buf, dev->store->block_size);
+ munmap (dev->buf, dev->store->block_size);
}
store_free (dev->store);
@@ -414,8 +412,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
/* Copy from wherever the read put it. */
{
bcopy (req_buf, _req_buf, req_len);
- vm_deallocate (mach_task_self (),
- (vm_address_t)req_buf, req_len);
+ munmap (req_buf, req_len);
}
*amount = req_len;
}
@@ -443,7 +440,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
err = dev_rw (dev, offs, whole_amount, len, buf_read, raw_read);
if (err && allocated_buf)
- vm_deallocate (mach_task_self (), (vm_address_t)*buf, whole_amount);
+ munmap (*buf, whole_amount);
return err;
}
diff --git a/storeio/pager.c b/storeio/pager.c
index bb6ccd36..dfcf9b38 100644
--- a/storeio/pager.c
+++ b/storeio/pager.c
@@ -86,7 +86,7 @@ pager_write_page (struct user_pager_info *upi,
err = dev_write (dev, page, (char *)buf, want, &written);
- vm_deallocate (mach_task_self (), buf, vm_page_size);
+ munmap ((caddr_t) buf, vm_page_size);
if (err || written < want)
return EIO;