summaryrefslogtreecommitdiff
path: root/ufs/hyper.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-11-11 16:45:33 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-11-11 16:45:33 +0000
commit29b0676739a5668d674aa2c41ca45a6fee9119e4 (patch)
tree742d74aaf2bcda0dda77ce36ad29b5abfe9578da /ufs/hyper.c
parent21391407458d3a5dbe48006bb8af1c5aec71e34f (diff)
(diskfs_set_hypermetadata): Always use dev_write_sync to avoid
device_write bug that says you can't modify the buffer until device_write returns. Also remember to deallocate BUF.
Diffstat (limited to 'ufs/hyper.c')
-rw-r--r--ufs/hyper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ufs/hyper.c b/ufs/hyper.c
index 9f8bd8d5..94fd209c 100644
--- a/ufs/hyper.c
+++ b/ufs/hyper.c
@@ -132,10 +132,10 @@ diskfs_set_hypermetadata (int wait, int clean)
if (!err)
{
bcopy (csum, (void *) buf, sblock->fs_cssize);
- (wait ? dev_write_sync : dev_write) (fsbtodb (sblock, sblock->fs_csaddr),
- buf, bufsize);
+ dev_write_sync (fsbtodb (sblock, sblock->fs_csaddr), buf, bufsize);
csum_dirty = 0;
}
+ vm_deallocate (mach_task_self (), buf, bufsize);
spin_unlock (&alloclock);
}