Index: uspace/srv/fs/tmpfs/tmpfs.h
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.h	(revision a8e9ab8dd2fc2d06e904785bacded96f27319e6c)
+++ uspace/srv/fs/tmpfs/tmpfs.h	(revision 923c39ef88449c3bf5f20c07c2f7976b7c01ec22)
@@ -44,5 +44,5 @@
 
 typedef struct tmpfs_dentry {
-	unsigned long index;	/**< TMPFS node index. */
+	fs_index_t index;	/**< TMPFS node index. */
 	link_t dh_link;		/**< Dentries hash table link. */
 	struct tmpfs_dentry *sibling;
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision a8e9ab8dd2fc2d06e904785bacded96f27319e6c)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 923c39ef88449c3bf5f20c07c2f7976b7c01ec22)
@@ -71,5 +71,5 @@
 /* Forward declarations of static functions. */
 static bool tmpfs_match(void *, void *, const char *);
-static void *tmpfs_node_get(int, int, unsigned long);
+static void *tmpfs_node_get(fs_handle_t, dev_handle_t, fs_index_t);
 static void *tmpfs_create_node(int);
 static bool tmpfs_link_node(void *, void *, const char *);
@@ -78,10 +78,10 @@
 
 /* Implementation of helper functions. */
-static unsigned long tmpfs_index_get(void *nodep)
+static fs_index_t tmpfs_index_get(void *nodep)
 {
 	return ((tmpfs_dentry_t *) nodep)->index;
 }
 
-static unsigned long tmpfs_size_get(void *nodep)
+static size_t tmpfs_size_get(void *nodep)
 {
 	return ((tmpfs_dentry_t *) nodep)->size;
@@ -170,5 +170,5 @@
 };
 
-unsigned tmpfs_next_index = 1;
+fs_index_t tmpfs_next_index = 1;
 
 typedef struct {
@@ -263,7 +263,9 @@
 }
 
-void *tmpfs_node_get(int fs_handle, int dev_handle, unsigned long index)
-{
-	link_t *lnk = hash_table_find(&dentries, &index);
+void *
+tmpfs_node_get(fs_handle_t fs_handle, dev_handle_t dev_handle, fs_index_t index)
+{
+	unsigned long key = index;
+	link_t *lnk = hash_table_find(&dentries, &key);
 	if (!lnk)
 		return NULL;
@@ -290,5 +292,6 @@
 
 	/* Insert the new node into the dentry hash table. */
-	hash_table_insert(&dentries, &node->index, &node->dh_link);
+	unsigned long key = node->index;
+	hash_table_insert(&dentries, &key, &node->dh_link);
 	return (void *) node;
 }
@@ -370,6 +373,6 @@
 	assert(!dentry->sibling);
 
-	unsigned long index = dentry->index;
-	hash_table_remove(&dentries, &index, 1);
+	unsigned long key = dentry->index;
+	hash_table_remove(&dentries, &key, 1);
 
 	hash_table_destroy(&dentry->names);
@@ -392,7 +395,7 @@
 void tmpfs_read(ipc_callid_t rid, ipc_call_t *request)
 {
-	int dev_handle = IPC_GET_ARG1(*request);
-	unsigned long index = IPC_GET_ARG2(*request);
-	off_t pos = IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
+	off_t pos = (off_t)IPC_GET_ARG3(*request);
 
 	/*
@@ -400,5 +403,6 @@
 	 */
 	link_t *hlp;
-	hlp = hash_table_find(&dentries, &index);
+	unsigned long key = index;
+	hlp = hash_table_find(&dentries, &key);
 	if (!hlp) {
 		ipc_answer_0(rid, ENOENT);
@@ -464,7 +468,7 @@
 void tmpfs_write(ipc_callid_t rid, ipc_call_t *request)
 {
-	int dev_handle = IPC_GET_ARG1(*request);
-	unsigned long index = IPC_GET_ARG2(*request);
-	off_t pos = IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
+	off_t pos = (off_t)IPC_GET_ARG3(*request);
 
 	/*
@@ -472,5 +476,6 @@
 	 */
 	link_t *hlp;
-	hlp = hash_table_find(&dentries, &index);
+	unsigned long key = index;
+	hlp = hash_table_find(&dentries, &key);
 	if (!hlp) {
 		ipc_answer_0(rid, ENOENT);
@@ -524,7 +529,7 @@
 void tmpfs_truncate(ipc_callid_t rid, ipc_call_t *request)
 {
-	int dev_handle = IPC_GET_ARG1(*request);
-	unsigned long index = IPC_GET_ARG2(*request);
-	size_t size = IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
+	size_t size = (off_t)IPC_GET_ARG3(*request);
 
 	/*
@@ -532,5 +537,6 @@
 	 */
 	link_t *hlp;
-	hlp = hash_table_find(&dentries, &index);
+	unsigned long key = index;
+	hlp = hash_table_find(&dentries, &key);
 	if (!hlp) {
 		ipc_answer_0(rid, ENOENT);
@@ -561,9 +567,10 @@
 void tmpfs_destroy(ipc_callid_t rid, ipc_call_t *request)
 {
-	int dev_handle = IPC_GET_ARG1(*request);
-	unsigned long index = IPC_GET_ARG2(*request);
+	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
 
 	link_t *hlp;
-	hlp = hash_table_find(&dentries, &index);
+	unsigned long key = index;
+	hlp = hash_table_find(&dentries, &key);
 	if (!hlp) {
 		ipc_answer_0(rid, ENOENT);
