From 29b0676739a5668d674aa2c41ca45a6fee9119e4 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 11 Nov 1994 16:45:33 +0000 Subject: (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. --- ufs/hyper.c | 4 ++-- 1 file 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); } -- cgit v1.2.3