/[hurd]/hurd/tmpfs/node.c
ViewVC logotype

Diff of /hurd/tmpfs/node.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by roland, Sun Jun 2 21:41:20 2002 UTC revision 1.12 by roland, Tue Jun 11 21:40:50 2002 UTC
# Line 52  diskfs_alloc_node (struct node *dp, mode Line 52  diskfs_alloc_node (struct node *dp, mode
52    spin_unlock (&diskfs_node_refcnt_lock);    spin_unlock (&diskfs_node_refcnt_lock);
53    
54    dn->type = IFTODT (mode & S_IFMT);    dn->type = IFTODT (mode & S_IFMT);
55    return diskfs_cached_lookup ((ino_t) dn, npp);    return diskfs_cached_lookup ((ino_t) (uintptr_t) dn, npp);
56  }  }
57    
58  void  void
# Line 154  recompute_blocks (struct node *np) Line 154  recompute_blocks (struct node *np)
154  /* Fetch inode INUM, set *NPP to the node structure;  /* Fetch inode INUM, set *NPP to the node structure;
155     gain one user reference and lock the node.  */     gain one user reference and lock the node.  */
156  error_t  error_t
157  diskfs_cached_lookup (int inum, struct node **npp)  diskfs_cached_lookup (ino_t inum, struct node **npp)
158  {  {
159    struct disknode *dn = (void *) inum;    struct disknode *dn = (void *) (uintptr_t) inum;
160    struct node *np;    struct node *np;
161    
162    assert (npp);    assert (npp);
# Line 175  diskfs_cached_lookup (int inum, struct n Line 175  diskfs_cached_lookup (int inum, struct n
175        struct stat *st;        struct stat *st;
176    
177        np = diskfs_make_node (dn);        np = diskfs_make_node (dn);
178        np->cache_id = (ino_t) dn;        np->cache_id = (ino_t) (uintptr_t) dn;
179    
180        spin_lock (&diskfs_node_refcnt_lock);        spin_lock (&diskfs_node_refcnt_lock);
181        dn->hnext = all_nodes;        dn->hnext = all_nodes;
# Line 191  diskfs_cached_lookup (int inum, struct n Line 191  diskfs_cached_lookup (int inum, struct n
191        st->st_fsid = getpid ();        st->st_fsid = getpid ();
192        st->st_blksize = vm_page_size;        st->st_blksize = vm_page_size;
193    
194        st->st_ino = (ino_t) dn;        st->st_ino = (ino_t) (uintptr_t) dn;
195        st->st_gen = dn->gen;        st->st_gen = dn->gen;
196    
197        st->st_size = dn->size;        st->st_size = dn->size;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26