diff options
author | Miles Bader <miles@gnu.org> | 1996-04-04 21:39:51 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-04-04 21:39:51 +0000 |
commit | 4abdd4dccce11f8a35e546140aa1ceaa7a498b30 (patch) | |
tree | ac1a8355765e9c7f51115105acf9f17c7dcbd59c /ufs | |
parent | 559ee1ac7a21c141803ecdd1d049660e5966fda8 (diff) |
(diskfs_cached_lookup): Intialize NP->cache_id *after* NP exists.
Diffstat (limited to 'ufs')
-rw-r--r-- | ufs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ufs/inode.c b/ufs/inode.c index ef0d9241..e4b26f81 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -66,7 +66,7 @@ diskfs_cached_lookup (int inum, struct node **npp) dn = malloc (sizeof (struct disknode)); - np->cache_id = dn->number = inum; + dn->number = inum; dn->dirents = 0; rwlock_init (&dn->allocptrlock); @@ -74,6 +74,8 @@ diskfs_cached_lookup (int inum, struct node **npp) dn->fileinfo = 0; np = diskfs_make_node (dn); + np->cache_id = inum; + mutex_lock (&np->lock); dn->hnext = nodehash[INOHASH(inum)]; if (dn->hnext) |