summaryrefslogtreecommitdiff
path: root/tmpfs/node.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-06-11 21:40:50 +0000
committerRoland McGrath <roland@gnu.org>2002-06-11 21:40:50 +0000
commit6814a9338d1211625964ca3a702cd38e8708bc6f (patch)
treeac8e08525b76456e43d04cdac815878057a8461e /tmpfs/node.c
parent0393dca401038f070914450f27574baba9f7afe1 (diff)
2002-06-08 Roland McGrath <roland@frob.com>
* node.c (diskfs_cached_lookup): Use ino_t for argument. * node.c (diskfs_alloc_node): Case to uintptr_t before ino_t. (diskfs_cached_lookup): Likewise, and vice versa. * dir.c (diskfs_get_directs, diskfs_lookup_hard): Likewise.
Diffstat (limited to 'tmpfs/node.c')
-rw-r--r--tmpfs/node.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tmpfs/node.c b/tmpfs/node.c
index 4e0d0d53..fd6bd722 100644
--- a/tmpfs/node.c
+++ b/tmpfs/node.c
@@ -52,7 +52,7 @@ diskfs_alloc_node (struct node *dp, mode_t mode, struct node **npp)
spin_unlock (&diskfs_node_refcnt_lock);
dn->type = IFTODT (mode & S_IFMT);
- return diskfs_cached_lookup ((ino_t) dn, npp);
+ return diskfs_cached_lookup ((ino_t) (uintptr_t) dn, npp);
}
void
@@ -154,9 +154,9 @@ recompute_blocks (struct node *np)
/* Fetch inode INUM, set *NPP to the node structure;
gain one user reference and lock the node. */
error_t
-diskfs_cached_lookup (int inum, struct node **npp)
+diskfs_cached_lookup (ino_t inum, struct node **npp)
{
- struct disknode *dn = (void *) inum;
+ struct disknode *dn = (void *) (uintptr_t) inum;
struct node *np;
assert (npp);
@@ -175,7 +175,7 @@ diskfs_cached_lookup (int inum, struct node **npp)
struct stat *st;
np = diskfs_make_node (dn);
- np->cache_id = (ino_t) dn;
+ np->cache_id = (ino_t) (uintptr_t) dn;
spin_lock (&diskfs_node_refcnt_lock);
dn->hnext = all_nodes;
@@ -191,7 +191,7 @@ diskfs_cached_lookup (int inum, struct node **npp)
st->st_fsid = getpid ();
st->st_blksize = vm_page_size;
- st->st_ino = (ino_t) dn;
+ st->st_ino = (ino_t) (uintptr_t) dn;
st->st_gen = dn->gen;
st->st_size = dn->size;