diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:55:45 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:55:45 +0000 |
commit | 99901fb5c9b4a394d25e4238eadf0677093215ee (patch) | |
tree | 05c18fa3c65578282c73312215b69f4e9859a85b /ufs/dir.c | |
parent | 9c704634732f77b5ccd28ca224eac4b71d722e4a (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.
Diffstat (limited to 'ufs/dir.c')
-rw-r--r-- | ufs/dir.c | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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 */ |