From 7a3e44b2f99ee99e694a214df6567589386a2935 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 27 Sep 1994 02:52:31 +0000 Subject: Formerly inode.c.~41~ --- ufs/inode.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'ufs') diff --git a/ufs/inode.c b/ufs/inode.c index 3edb697f..91963c16 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -16,7 +16,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "ufs.h" -#include "dinode.h" #include #include #include @@ -156,6 +155,8 @@ void diskfs_lost_hardrefs (struct node *np) { struct port_info *pi; + struct pager *p; + /* Check and see if there is a pager which has only one reference (ours). If so, then drop that reference, breaking the cycle. The complexity in this routine @@ -164,7 +165,7 @@ diskfs_lost_hardrefs (struct node *np) if (np->dn->fileinfo) { spin_lock (&_libports_portrefcntlock); - pi = np->dn->fileinfo->p; + pi = (struct port_info *) np->dn->fileinfo->p; if (pi->refcnt == 1) { @@ -500,25 +501,26 @@ diskfs_set_translator (struct node *np, char *name, u_int namelen, error_t diskfs_get_translator (struct node *np, char **namep, u_int *namelen) { - XXX FIXME error_t err; daddr_t blkno; - char *buf; u_int datalen; + void *transloc; err = diskfs_catch_exception (); if (err) return err; + blkno = (dino (np->dn->number))->di_trans; - assert (blkno); - bcopy (disk_image + fsaddr (sblock, blkno), buf, sblock->fs_bsize); - diskfs_end_catch_exception (); + transloc = disk_image + fsaddr (sblock, blkno); - datalen = *(u_int *)buf; + datalen = *(u_int *)transloc; if (datalen > *namelen) vm_allocate (mach_task_self (), (vm_address_t *) namep, datalen, 1); - bcopy (buf + sizeof (u_int), *namep, datalen); + bcopy (transloc + sizeof (u_int), *namep, datalen); + + diskfs_end_catch_exception (); + *namelen = datalen; return 0; } -- cgit v1.2.3