summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-03 23:55:45 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-03 23:55:45 +0000
commit99901fb5c9b4a394d25e4238eadf0677093215ee (patch)
tree05c18fa3c65578282c73312215b69f4e9859a85b
parent9c704634732f77b5ccd28ca224eac4b71d722e4a (diff)
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* dir.c (diskfs_lookup_hard): Use munmap instead of vm_deallocate. (diskfs_direnter_hard): Likewise. (diskfs_dirremove_hard): Likewise. (diskfs_dirrewrite_hard): Likewise. (diskfs_dirempty): Likewise. (diskfs_drop_dirstat): Likewise. (diskfs_get_directs): Likewise. * sizes.c (block_extended): Likewise. (poke_pages): Likewise. * hyper.c (get_hypermetadata): Likewise. (diskfs_set_hypermetadata): Likewise.
-rw-r--r--ufs/ChangeLog15
-rw-r--r--ufs/dir.c27
-rw-r--r--ufs/hyper.c5
-rw-r--r--ufs/sizes.c6
4 files changed, 33 insertions, 20 deletions
diff --git a/ufs/ChangeLog b/ufs/ChangeLog
index 7b0fee70..8791b327 100644
--- a/ufs/ChangeLog
+++ b/ufs/ChangeLog
@@ -1,3 +1,18 @@
+1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * dir.c (diskfs_lookup_hard): Use munmap instead of
+ vm_deallocate.
+ (diskfs_direnter_hard): Likewise.
+ (diskfs_dirremove_hard): Likewise.
+ (diskfs_dirrewrite_hard): Likewise.
+ (diskfs_dirempty): Likewise.
+ (diskfs_drop_dirstat): Likewise.
+ (diskfs_get_directs): Likewise.
+ * sizes.c (block_extended): Likewise.
+ (poke_pages): Likewise.
+ * hyper.c (get_hypermetadata): Likewise.
+ (diskfs_set_hypermetadata): Likewise.
+
1999-06-29 Thomas Bushnell, BSG <tb@mit.edu>
* hyper.c (diskfs_readonly_changed): Adjust whether the store
diff --git a/ufs/dir.c b/ufs/dir.c
index 01432829..c17549c2 100644
--- a/ufs/dir.c
+++ b/ufs/dir.c
@@ -1,5 +1,5 @@
/* Directory management routines
- Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -137,7 +137,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
}
if (buf)
{
- vm_deallocate (mach_task_self (), buf, buflen);
+ munmap ((caddr_t) buf, buflen);
buf = 0;
}
if (ds && (type == CREATE || type == RENAME))
@@ -181,7 +181,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
}
if (err != ENOENT)
{
- vm_deallocate (mach_task_self (), buf, buflen);
+ munmap ((caddr_t) buf, buflen);
return err;
}
@@ -295,7 +295,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type,
|| !ds
|| ds->type == LOOKUP)
{
- vm_deallocate (mach_task_self (), buf, buflen);
+ vm_deallocate ((caddr_t) buf, buflen);
if (ds)
ds->type = LOOKUP; /* set to be ignored by drop_dirstat */
}
@@ -586,7 +586,7 @@ diskfs_direnter_hard(struct node *dp,
err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred);
if (err)
{
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ munmap ((caddr_t) ds->mapbuf, ds->mapextent);
return err;
}
}
@@ -610,7 +610,7 @@ diskfs_direnter_hard(struct node *dp,
dp->dn_set_mtime = 1;
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ munmap ((caddr_t) ds->mapbuf, ds->mapextent);
if (ds->stat != EXTEND)
{
@@ -678,7 +678,7 @@ diskfs_dirremove_hard(struct node *dp,
dp->dn_set_mtime = 1;
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ munmap ((caddr_t) ds->mapbuf, ds->mapextent);
/* If we are keeping count of this block, then keep the count up
to date. */
@@ -711,7 +711,7 @@ diskfs_dirrewrite_hard(struct node *dp,
ds->entry->d_type = IFTODT (np->dn_stat.st_mode);
dp->dn_set_mtime = 1;
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ munmap ((caddr_t) ds->mapbuf, ds->mapextent);
diskfs_file_update (dp, 1);
@@ -758,7 +758,7 @@ diskfs_dirempty(struct node *dp,
|| (entry->d_name[1] != '.'
&& entry->d_name[1] != '\0')))
{
- vm_deallocate (mach_task_self (), buf, dp->dn_stat.st_size);
+ munmap ((caddr_t) buf, dp->dn_stat.st_size);
if (!diskfs_check_readonly ())
dp->dn_set_atime = 1;
if (diskfs_synchronous)
@@ -770,7 +770,7 @@ diskfs_dirempty(struct node *dp,
dp->dn_set_atime = 1;
if (diskfs_synchronous)
diskfs_node_update (dp, 1);
- vm_deallocate (mach_task_self (), buf, dp->dn_stat.st_size);
+ munmap ((caddr_t) buf, dp->dn_stat.st_size);
return 1;
}
@@ -781,7 +781,7 @@ diskfs_drop_dirstat (struct node *dp, struct dirstat *ds)
if (ds->type != LOOKUP)
{
assert (ds->mapbuf);
- vm_deallocate (mach_task_self (), ds->mapbuf, ds->mapextent);
+ munmap ((caddr_t) ds->mapbuf, ds->mapextent);
ds->type = LOOKUP;
}
return 0;
@@ -968,9 +968,8 @@ diskfs_get_directs (struct node *dp,
if (allocsize > *datacnt)
{
if (round_page (datap - *data) < allocsize)
- vm_deallocate (mach_task_self (),
- (vm_address_t) (*data + round_page (datap - *data)),
- allocsize - round_page (datap - *data));
+ munmap (*data + round_page (datap - *data),
+ allocsize - round_page (datap - *data));
}
/* Set variables for return */
diff --git a/ufs/hyper.c b/ufs/hyper.c
index c5101141..deb4a5df 100644
--- a/ufs/hyper.c
+++ b/ufs/hyper.c
@@ -138,8 +138,7 @@ get_hypermetadata (void)
/* Free previous values. */
if (zeroblock)
- vm_deallocate (mach_task_self(),
- (vm_address_t)zeroblock, sblock->fs_bsize);
+ munmap ((caddr_t) zeroblock, sblock->fs_bsize);
if (csum)
free (csum);
@@ -314,7 +313,7 @@ diskfs_set_hypermetadata (int wait, int clean)
err = EIO;
}
- vm_deallocate (mach_task_self (), (vm_address_t)buf, read);
+ munmap (buf, read);
if (err)
{
diff --git a/ufs/sizes.c b/ufs/sizes.c
index 5c3d12f0..58cbfc98 100644
--- a/ufs/sizes.c
+++ b/ufs/sizes.c
@@ -1,5 +1,5 @@
/* File growth and truncation
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999 Free Software Foundation
This file is part of the GNU Hurd.
@@ -439,7 +439,7 @@ block_extended (struct node *np,
/* Undo mapping */
mach_port_deallocate (mach_task_self (), mapobj);
- vm_deallocate (mach_task_self (), mapaddr, round_page (old_size));
+ munmap ((caddr_t) mapaddr, round_page (old_size));
/* Now it's OK to free the old block */
ffs_blkfree (np, old_pbn, old_size);
@@ -711,7 +711,7 @@ poke_pages (memory_object_t obj,
{
for (poke = addr; poke < addr + len; poke += vm_page_size)
*(volatile int *)poke = *(volatile int *)poke;
- vm_deallocate (mach_task_self (), addr, len);
+ munmap ((caddr_t) addr, len);
}
start += len;
}