Index: uspace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/lib/libfs/libfs.c	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -149,7 +149,7 @@
 		last += PLB_SIZE;
 
-	void *par = NULL;
-	void *cur = ops->root_get(dev_handle);
-	void *tmp = NULL;
+	fs_node_t *par = NULL;
+	fs_node_t *cur = ops->root_get(dev_handle);
+	fs_node_t *tmp = NULL;
 
 	if (ops->plb_get_char(next) == '/')
@@ -190,18 +190,17 @@
 					goto out;
 				}
-				void *nodep;
+				fs_node_t *fn;
 				if (lflag & L_CREATE)
-					nodep = ops->create(dev_handle, lflag);
+					fn = ops->create(dev_handle, lflag);
 				else
-					nodep = ops->node_get(dev_handle,
+					fn = ops->node_get(dev_handle,
 					    index);
-				if (nodep) {
+				if (fn) {
 					int rc;
 
-					rc = ops->link(cur, nodep, component);
+					rc = ops->link(cur, fn, component);
 					if (rc != EOK) {
 						if (lflag & L_CREATE) {
-							(void)ops->destroy(
-							    nodep);
+							(void)ops->destroy(fn);
 						}
 						ipc_answer_0(rid, rc);
@@ -209,8 +208,8 @@
 						ipc_answer_5(rid, EOK,
 						    fs_handle, dev_handle,
-						    ops->index_get(nodep),
-						    ops->size_get(nodep),
-						    ops->lnkcnt_get(nodep));
-						ops->node_put(nodep);
+						    ops->index_get(fn),
+						    ops->size_get(fn),
+						    ops->lnkcnt_get(fn));
+						ops->node_put(fn);
 					}
 				} else {
@@ -264,24 +263,24 @@
 			component[len] = '\0';
 				
-			void *nodep;
+			fs_node_t *fn;
 			if (lflag & L_CREATE)
-				nodep = ops->create(dev_handle, lflag);
+				fn = ops->create(dev_handle, lflag);
 			else
-				nodep = ops->node_get(dev_handle, index);
-			if (nodep) {
+				fn = ops->node_get(dev_handle, index);
+			if (fn) {
 				int rc;
 
-				rc = ops->link(cur, nodep, component);
+				rc = ops->link(cur, fn, component);
 				if (rc != EOK) {
 					if (lflag & L_CREATE)
-						(void)ops->destroy(nodep);
+						(void)ops->destroy(fn);
 					ipc_answer_0(rid, rc);
 				} else {
 					ipc_answer_5(rid, EOK,
 					    fs_handle, dev_handle,
-					    ops->index_get(nodep),
-					    ops->size_get(nodep),
-					    ops->lnkcnt_get(nodep));
-					ops->node_put(nodep);
+					    ops->index_get(fn),
+					    ops->size_get(fn),
+					    ops->lnkcnt_get(fn));
+					ops->node_put(fn);
 				}
 			} else {
Index: uspace/lib/libfs/libfs.h
===================================================================
--- uspace/lib/libfs/libfs.h	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/lib/libfs/libfs.h	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -43,19 +43,23 @@
 
 typedef struct {
-	void * (* match)(void *, const char *);
-	void * (* node_get)(dev_handle_t, fs_index_t);
-	void (* node_put)(void *);
-	void * (* create)(dev_handle_t, int);
-	int (* destroy)(void *);
-	int (* link)(void *, void *, const char *);
-	int (* unlink)(void *, void *);
-	fs_index_t (* index_get)(void *);
-	size_t (* size_get)(void *);
-	unsigned (* lnkcnt_get)(void *);
-	bool (* has_children)(void *);
-	void *(* root_get)(dev_handle_t);
+	void *data;	/**< Data of the file system implementation. */
+} fs_node_t;
+
+typedef struct {
+	fs_node_t * (* match)(fs_node_t *, const char *);
+	fs_node_t * (* node_get)(dev_handle_t, fs_index_t);
+	void (* node_put)(fs_node_t *);
+	fs_node_t * (* create)(dev_handle_t, int);
+	int (* destroy)(fs_node_t *);
+	int (* link)(fs_node_t *, fs_node_t *, const char *);
+	int (* unlink)(fs_node_t *, fs_node_t *);
+	fs_index_t (* index_get)(fs_node_t *);
+	size_t (* size_get)(fs_node_t *);
+	unsigned (* lnkcnt_get)(fs_node_t *);
+	bool (* has_children)(fs_node_t *);
+	fs_node_t *(* root_get)(dev_handle_t);
 	char (* plb_get_char)(unsigned pos);	
-	bool (* is_directory)(void *);
-	bool (* is_file)(void *);
+	bool (* is_directory)(fs_node_t *);
+	bool (* is_file)(fs_node_t *);
 } libfs_ops_t;
 
Index: uspace/srv/fs/fat/fat.h
===================================================================
--- uspace/srv/fs/fat/fat.h	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/srv/fs/fat/fat.h	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -179,4 +179,7 @@
 /** FAT in-core node. */
 typedef struct fat_node {
+	/** Back pointer to the FS node. */
+	fs_node_t		*bp;
+	
 	futex_t			lock;
 	fat_node_type_t		type;
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/srv/fs/fat/fat_ops.c	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -56,4 +56,7 @@
 #include <align.h>
 
+#define FAT_NODE(node)	((node) ? (fat_node_t *) (node)->data : NULL)
+#define FS_NODE(node)	((node) ? (node)->bp : NULL)
+
 /** Futex protecting the list of cached free FAT nodes. */
 static futex_t ffn_futex = FUTEX_INITIALIZER;
@@ -65,4 +68,5 @@
 {
 	futex_initialize(&node->lock, 1);
+	node->bp = NULL;
 	node->idx = NULL;
 	node->type = 0;
@@ -109,4 +113,5 @@
 static fat_node_t *fat_node_get_new(void)
 {
+	fs_node_t *fn;
 	fat_node_t *nodep;
 
@@ -130,13 +135,21 @@
 		futex_up(&nodep->lock);
 		futex_up(&idxp_tmp->lock);
+		fn = FS_NODE(nodep);
 	} else {
 skip_cache:
 		/* Try to allocate a new node structure. */
 		futex_up(&ffn_futex);
+		fn = (fs_node_t *)malloc(sizeof(fs_node_t));
+		if (!fn)
+			return NULL;
 		nodep = (fat_node_t *)malloc(sizeof(fat_node_t));
-		if (!nodep)
+		if (!nodep) {
+			free(fn);
 			return NULL;
+		}
 	}
 	fat_node_initialize(nodep);
+	fn->data = nodep;
+	nodep->bp = fn;
 	
 	return nodep;
@@ -147,5 +160,5 @@
  * @param idxp		Locked index structure.
  */
-static void *fat_node_get_core(fat_idx_t *idxp)
+static fat_node_t *fat_node_get_core(fat_idx_t *idxp)
 {
 	block_t *b;
@@ -224,19 +237,19 @@
  * Forward declarations of FAT libfs operations.
  */
-static void *fat_node_get(dev_handle_t, fs_index_t);
-static void fat_node_put(void *);
-static void *fat_create_node(dev_handle_t, int);
-static int fat_destroy_node(void *);
-static int fat_link(void *, void *, const char *);
-static int fat_unlink(void *, void *);
-static void *fat_match(void *, const char *);
-static fs_index_t fat_index_get(void *);
-static size_t fat_size_get(void *);
-static unsigned fat_lnkcnt_get(void *);
-static bool fat_has_children(void *);
-static void *fat_root_get(dev_handle_t);
+static fs_node_t *fat_node_get(dev_handle_t, fs_index_t);
+static void fat_node_put(fs_node_t *);
+static fs_node_t *fat_create_node(dev_handle_t, int);
+static int fat_destroy_node(fs_node_t *);
+static int fat_link(fs_node_t *, fs_node_t *, const char *);
+static int fat_unlink(fs_node_t *, fs_node_t *);
+static fs_node_t *fat_match(fs_node_t *, const char *);
+static fs_index_t fat_index_get(fs_node_t *);
+static size_t fat_size_get(fs_node_t *);
+static unsigned fat_lnkcnt_get(fs_node_t *);
+static bool fat_has_children(fs_node_t *);
+static fs_node_t *fat_root_get(dev_handle_t);
 static char fat_plb_get_char(unsigned);
-static bool fat_is_directory(void *);
-static bool fat_is_file(void *node);
+static bool fat_is_directory(fs_node_t *);
+static bool fat_is_file(fs_node_t *node);
 
 /*
@@ -245,7 +258,7 @@
 
 /** Instantiate a FAT in-core node. */
-void *fat_node_get(dev_handle_t dev_handle, fs_index_t index)
-{
-	void *node;
+fs_node_t *fat_node_get(dev_handle_t dev_handle, fs_index_t index)
+{
+	fat_node_t *nodep;
 	fat_idx_t *idxp;
 
@@ -254,12 +267,12 @@
 		return NULL;
 	/* idxp->lock held */
-	node = fat_node_get_core(idxp);
+	nodep = fat_node_get_core(idxp);
 	futex_up(&idxp->lock);
-	return node;
-}
-
-void fat_node_put(void *node)
-{
-	fat_node_t *nodep = (fat_node_t *)node;
+	return FS_NODE(nodep);
+}
+
+void fat_node_put(fs_node_t *fn)
+{
+	fat_node_t *nodep = FAT_NODE(fn);
 	bool destroy = false;
 
@@ -281,9 +294,11 @@
 	}
 	futex_up(&nodep->lock);
-	if (destroy)
-		free(node);
-}
-
-void *fat_create_node(dev_handle_t dev_handle, int flags)
+	if (destroy) {
+		free(nodep->bp);
+		free(nodep);
+	}
+}
+
+fs_node_t *fat_create_node(dev_handle_t dev_handle, int flags)
 {
 	fat_idx_t *idxp;
@@ -311,5 +326,5 @@
 	if (!idxp) {
 		fat_free_clusters(bs, dev_handle, mcl);	
-		fat_node_put(nodep);
+		fat_node_put(FS_NODE(nodep));
 		return NULL;
 	}
@@ -346,10 +361,10 @@
 
 	futex_up(&idxp->lock);
-	return nodep;
-}
-
-int fat_destroy_node(void *node)
-{
-	fat_node_t *nodep = (fat_node_t *)node;
+	return FS_NODE(nodep);
+}
+
+int fat_destroy_node(fs_node_t *fn)
+{
+	fat_node_t *nodep = FAT_NODE(fn);
 	fat_bs_t *bs;
 
@@ -365,5 +380,5 @@
 	 * The node may not have any children.
 	 */
-	assert(fat_has_children(node) == false);
+	assert(fat_has_children(fn) == false);
 
 	bs = block_bb_get(nodep->idx->dev_handle);
@@ -375,12 +390,13 @@
 
 	fat_idx_destroy(nodep->idx);
+	free(nodep->bp);
 	free(nodep);
 	return EOK;
 }
 
-int fat_link(void *prnt, void *chld, const char *name)
-{
-	fat_node_t *parentp = (fat_node_t *)prnt;
-	fat_node_t *childp = (fat_node_t *)chld;
+int fat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+{
+	fat_node_t *parentp = FAT_NODE(pfn);
+	fat_node_t *childp = FAT_NODE(cfn);
 	fat_dentry_t *d;
 	fat_bs_t *bs;
@@ -528,8 +544,8 @@
 }
 
-int fat_unlink(void *prnt, void *chld)
-{
-	fat_node_t *parentp = (fat_node_t *)prnt;
-	fat_node_t *childp = (fat_node_t *)chld;
+int fat_unlink(fs_node_t *pfn, fs_node_t *cfn)
+{
+	fat_node_t *parentp = FAT_NODE(pfn);
+	fat_node_t *childp = FAT_NODE(cfn);
 	fat_bs_t *bs;
 	fat_dentry_t *d;
@@ -568,8 +584,8 @@
 }
 
-void *fat_match(void *prnt, const char *component)
+fs_node_t *fat_match(fs_node_t *pfn, const char *component)
 {
 	fat_bs_t *bs;
-	fat_node_t *parentp = (fat_node_t *)prnt;
+	fat_node_t *parentp = FAT_NODE(pfn);
 	char name[FAT_NAME_LEN + 1 + FAT_EXT_LEN + 1];
 	unsigned i, j;
@@ -604,5 +620,5 @@
 			if (fat_dentry_namecmp(name, component) == 0) {
 				/* hit */
-				void *node;
+				fat_node_t *nodep;
 				/*
 				 * Assume tree hierarchy for locking.  We
@@ -623,8 +639,8 @@
 					return NULL;
 				}
-				node = fat_node_get_core(idx);
+				nodep = fat_node_get_core(idx);
 				futex_up(&idx->lock);
 				block_put(b);
-				return node;
+				return FS_NODE(nodep);
 			}
 		}
@@ -636,26 +652,23 @@
 }
 
-fs_index_t fat_index_get(void *node)
-{
-	fat_node_t *fnodep = (fat_node_t *)node;
-	if (!fnodep)
-		return 0;
-	return fnodep->idx->index;
-}
-
-size_t fat_size_get(void *node)
-{
-	return ((fat_node_t *)node)->size;
-}
-
-unsigned fat_lnkcnt_get(void *node)
-{
-	return ((fat_node_t *)node)->lnkcnt;
-}
-
-bool fat_has_children(void *node)
+fs_index_t fat_index_get(fs_node_t *fn)
+{
+	return FAT_NODE(fn)->idx->index;
+}
+
+size_t fat_size_get(fs_node_t *fn)
+{
+	return FAT_NODE(fn)->size;
+}
+
+unsigned fat_lnkcnt_get(fs_node_t *fn)
+{
+	return FAT_NODE(fn)->lnkcnt;
+}
+
+bool fat_has_children(fs_node_t *fn)
 {
 	fat_bs_t *bs;
-	fat_node_t *nodep = (fat_node_t *)node;
+	fat_node_t *nodep = FAT_NODE(fn);
 	unsigned bps;
 	unsigned dps;
@@ -705,5 +718,5 @@
 }
 
-void *fat_root_get(dev_handle_t dev_handle)
+fs_node_t *fat_root_get(dev_handle_t dev_handle)
 {
 	return fat_node_get(dev_handle, 0);
@@ -715,12 +728,12 @@
 }
 
-bool fat_is_directory(void *node)
-{
-	return ((fat_node_t *)node)->type == FAT_DIRECTORY;
-}
-
-bool fat_is_file(void *node)
-{
-	return ((fat_node_t *)node)->type == FAT_FILE;
+bool fat_is_directory(fs_node_t *fn)
+{
+	return FAT_NODE(fn)->type == FAT_DIRECTORY;
+}
+
+bool fat_is_file(fs_node_t *fn)
+{
+	return FAT_NODE(fn)->type == FAT_FILE;
 }
 
@@ -822,6 +835,6 @@
 
 	/* Initialize the root node. */
-	fat_node_t *rootp = (fat_node_t *)malloc(sizeof(fat_node_t));
-	if (!rootp) {
+	fs_node_t *rfn = (fs_node_t *)malloc(sizeof(fs_node_t));
+	if (!rfn) {
 		block_fini(dev_handle);
 		fat_idx_fini_by_dev_handle(dev_handle);
@@ -829,10 +842,19 @@
 		return;
 	}
+	fat_node_t *rootp = (fat_node_t *)malloc(sizeof(fat_node_t));
+	if (!rootp) {
+		free(rfn);
+		block_fini(dev_handle);
+		fat_idx_fini_by_dev_handle(dev_handle);
+		ipc_answer_0(rid, ENOMEM);
+		return;
+	}
 	fat_node_initialize(rootp);
 
 	fat_idx_t *ridxp = fat_idx_get_by_pos(dev_handle, FAT_CLST_ROOTPAR, 0);
 	if (!ridxp) {
+		free(rfn);
+		free(rootp);
 		block_fini(dev_handle);
-		free(rootp);
 		fat_idx_fini_by_dev_handle(dev_handle);
 		ipc_answer_0(rid, ENOMEM);
@@ -849,4 +871,6 @@
 	rootp->idx = ridxp;
 	ridxp->nodep = rootp;
+	rootp->bp = rfn;
+	rfn->data = rootp;
 	
 	futex_up(&ridxp->lock);
@@ -870,5 +894,6 @@
 	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
 	off_t pos = (off_t)IPC_GET_ARG3(*request);
-	fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index);
+	fs_node_t *fn = fat_node_get(dev_handle, index);
+	fat_node_t *nodep;
 	fat_bs_t *bs;
 	uint16_t bps;
@@ -876,13 +901,14 @@
 	block_t *b;
 
-	if (!nodep) {
+	if (!fn) {
 		ipc_answer_0(rid, ENOENT);
 		return;
 	}
+	nodep = FAT_NODE(fn);
 
 	ipc_callid_t callid;
 	size_t len;
 	if (!ipc_data_read_receive(&callid, &len)) {
-		fat_node_put(nodep);
+		fat_node_put(fn);
 		ipc_answer_0(callid, EINVAL);
 		ipc_answer_0(rid, EINVAL);
@@ -955,5 +981,5 @@
 		}
 miss:
-		fat_node_put(nodep);
+		fat_node_put(fn);
 		ipc_answer_0(callid, ENOENT);
 		ipc_answer_1(rid, ENOENT, 0);
@@ -964,5 +990,5 @@
 	}
 
-	fat_node_put(nodep);
+	fat_node_put(fn);
 	ipc_answer_1(rid, EOK, (ipcarg_t)bytes);
 }
@@ -973,5 +999,6 @@
 	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
 	off_t pos = (off_t)IPC_GET_ARG3(*request);
-	fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index);
+	fs_node_t *fn = fat_node_get(dev_handle, index);
+	fat_node_t *nodep;
 	fat_bs_t *bs;
 	size_t bytes;
@@ -983,13 +1010,14 @@
 	int flags = BLOCK_FLAGS_NONE;
 	
-	if (!nodep) {
+	if (!fn) {
 		ipc_answer_0(rid, ENOENT);
 		return;
 	}
+	nodep = FAT_NODE(fn);
 	
 	ipc_callid_t callid;
 	size_t len;
 	if (!ipc_data_write_receive(&callid, &len)) {
-		fat_node_put(nodep);
+		fat_node_put(fn);
 		ipc_answer_0(callid, EINVAL);
 		ipc_answer_0(rid, EINVAL);
@@ -1032,5 +1060,5 @@
 		}
 		ipc_answer_2(rid, EOK, bytes, nodep->size);	
-		fat_node_put(nodep);
+		fat_node_put(fn);
 		return;
 	} else {
@@ -1048,5 +1076,5 @@
 		if (status != EOK) {
 			/* could not allocate a chain of nclsts clusters */
-			fat_node_put(nodep);
+			fat_node_put(fn);
 			ipc_answer_0(callid, status);
 			ipc_answer_0(rid, status);
@@ -1069,5 +1097,5 @@
 		nodep->dirty = true;		/* need to sync node */
 		ipc_answer_2(rid, EOK, bytes, nodep->size);
-		fat_node_put(nodep);
+		fat_node_put(fn);
 		return;
 	}
@@ -1079,5 +1107,6 @@
 	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
 	size_t size = (off_t)IPC_GET_ARG3(*request);
-	fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index);
+	fs_node_t *fn = fat_node_get(dev_handle, index);
+	fat_node_t *nodep;
 	fat_bs_t *bs;
 	uint16_t bps;
@@ -1086,8 +1115,9 @@
 	int rc;
 
-	if (!nodep) {
+	if (!fn) {
 		ipc_answer_0(rid, ENOENT);
 		return;
 	}
+	nodep = FAT_NODE(fn);
 
 	bs = block_bb_get(dev_handle);
@@ -1127,5 +1157,5 @@
 		rc = EOK;	
 	}
-	fat_node_put(nodep);
+	fat_node_put(fn);
 	ipc_answer_0(rid, rc);
 	return;
@@ -1138,11 +1168,11 @@
 	int rc;
 
-	fat_node_t *nodep = fat_node_get(dev_handle, index);
-	if (!nodep) {
+	fs_node_t *fn = fat_node_get(dev_handle, index);
+	if (!fn) {
 		ipc_answer_0(rid, ENOENT);
 		return;
 	}
 
-	rc = fat_destroy_node(nodep);
+	rc = fat_destroy_node(fn);
 	ipc_answer_0(rid, rc);
 }
Index: uspace/srv/fs/tmpfs/tmpfs.h
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.h	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/srv/fs/tmpfs/tmpfs.h	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -45,4 +45,7 @@
 #endif
 
+#define TMPFS_NODE(node)	((node) ? (tmpfs_dentry_t *)(node)->data : NULL)
+#define FS_NODE(node)		((node) ? (node)->bp : NULL)
+
 typedef enum {
 	TMPFS_NONE,
@@ -52,4 +55,5 @@
 
 typedef struct tmpfs_dentry {
+	fs_node_t *bp;		/**< Back pointer to the FS node. */
 	fs_index_t index;	/**< TMPFS node index. */
 	dev_handle_t dev_handle;/**< Device handle. */
Index: uspace/srv/fs/tmpfs/tmpfs_dump.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -56,5 +56,5 @@
 static bool
 tmpfs_restore_recursion(int dev, off_t *bufpos, size_t *buflen, off_t *pos,
-    tmpfs_dentry_t *parent)
+    fs_node_t *pfn)
 {
 	struct rdentry entry;
@@ -64,5 +64,6 @@
 	do {
 		char *fname;
-		tmpfs_dentry_t *node;
+		fs_node_t *fn;
+		tmpfs_dentry_t *nodep;
 		uint32_t size;
 		
@@ -81,6 +82,6 @@
 				return false;
 			
-			node = (tmpfs_dentry_t *) ops->create(dev, L_FILE);
-			if (node == NULL) {
+			fn = ops->create(dev, L_FILE);
+			if (fn == NULL) {
 				free(fname);
 				return false;
@@ -89,5 +90,5 @@
 			if (block_read(dev, bufpos, buflen, pos, fname,
 			    entry.len, TMPFS_BLOCK_SIZE) != EOK) {
-				ops->destroy((void *) node);
+				ops->destroy(fn);
 				free(fname);
 				return false;
@@ -95,7 +96,7 @@
 			fname[entry.len] = 0;
 			
-			rc = ops->link((void *) parent, (void *) node, fname);
+			rc = ops->link(pfn, fn, fname);
 			if (rc != EOK) {
-				ops->destroy((void *) node);
+				ops->destroy(fn);
 				free(fname);
 				return false;
@@ -109,10 +110,11 @@
 			size = uint32_t_le2host(size);
 			
-			node->data = malloc(size);
-			if (node->data == NULL)
+			nodep = TMPFS_NODE(fn);
+			nodep->data = malloc(size);
+			if (nodep->data == NULL)
 				return false;
 			
-			node->size = size;
-			if (block_read(dev, bufpos, buflen, pos, node->data,
+			nodep->size = size;
+			if (block_read(dev, bufpos, buflen, pos, nodep->data,
 			    size, TMPFS_BLOCK_SIZE) != EOK)
 				return false;
@@ -124,6 +126,6 @@
 				return false;
 			
-			node = (tmpfs_dentry_t *) ops->create(dev, L_DIRECTORY);
-			if (node == NULL) {
+			fn = ops->create(dev, L_DIRECTORY);
+			if (fn == NULL) {
 				free(fname);
 				return false;
@@ -132,5 +134,5 @@
 			if (block_read(dev, bufpos, buflen, pos, fname,
 			    entry.len, TMPFS_BLOCK_SIZE) != EOK) {
-				ops->destroy((void *) node);
+				ops->destroy(fn);
 				free(fname);
 				return false;
@@ -138,7 +140,7 @@
 			fname[entry.len] = 0;
 
-			rc = ops->link((void *) parent, (void *) node, fname);
+			rc = ops->link(pfn, fn, fname);
 			if (rc != EOK) {
-				ops->destroy((void *) node);
+				ops->destroy(fn);
 				free(fname);
 				return false;
@@ -147,5 +149,5 @@
 			
 			if (!tmpfs_restore_recursion(dev, bufpos, buflen, pos,
-			    node))
+			    fn))
 				return false;
 			
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision c852f4be92deaf736e73515bda99db1fe2e05992)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision b6035ba00e0a19771a358284e5898b29f583e98f)
@@ -69,34 +69,34 @@
 
 /* Forward declarations of static functions. */
-static void *tmpfs_match(void *, const char *);
-static void *tmpfs_node_get(dev_handle_t, fs_index_t);
-static void tmpfs_node_put(void *);
-static void *tmpfs_create_node(dev_handle_t, int);
-static int tmpfs_link_node(void *, void *, const char *);
-static int tmpfs_unlink_node(void *, void *);
-static int tmpfs_destroy_node(void *);
+static fs_node_t *tmpfs_match(fs_node_t *, const char *);
+static fs_node_t *tmpfs_node_get(dev_handle_t, fs_index_t);
+static void tmpfs_node_put(fs_node_t *);
+static fs_node_t *tmpfs_create_node(dev_handle_t, int);
+static int tmpfs_link_node(fs_node_t *, fs_node_t *, const char *);
+static int tmpfs_unlink_node(fs_node_t *, fs_node_t *);
+static int tmpfs_destroy_node(fs_node_t *);
 
 /* Implementation of helper functions. */
-static fs_index_t tmpfs_index_get(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->index;
-}
-
-static size_t tmpfs_size_get(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->size;
-}
-
-static unsigned tmpfs_lnkcnt_get(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->lnkcnt;
-}
-
-static bool tmpfs_has_children(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->child != NULL;
-}
-
-static void *tmpfs_root_get(dev_handle_t dev_handle)
+static fs_index_t tmpfs_index_get(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->index;
+}
+
+static size_t tmpfs_size_get(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->size;
+}
+
+static unsigned tmpfs_lnkcnt_get(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->lnkcnt;
+}
+
+static bool tmpfs_has_children(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->child != NULL;
+}
+
+static fs_node_t *tmpfs_root_get(dev_handle_t dev_handle)
 {
 	return tmpfs_node_get(dev_handle, TMPFS_SOME_ROOT); 
@@ -108,12 +108,12 @@
 }
 
-static bool tmpfs_is_directory(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->type == TMPFS_DIRECTORY;
-}
-
-static bool tmpfs_is_file(void *nodep)
-{
-	return ((tmpfs_dentry_t *) nodep)->type == TMPFS_FILE;
+static bool tmpfs_is_directory(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->type == TMPFS_DIRECTORY;
+}
+
+static bool tmpfs_is_file(fs_node_t *fn)
+{
+	return TMPFS_NODE(fn)->type == TMPFS_FILE;
 }
 
@@ -214,4 +214,5 @@
 static bool tmpfs_dentry_initialize(tmpfs_dentry_t *dentry)
 {
+	dentry->bp = NULL;
 	dentry->index = 0;
 	dentry->dev_handle = 0;
@@ -237,10 +238,10 @@
 static bool tmpfs_instance_init(dev_handle_t dev_handle)
 {
-	tmpfs_dentry_t *root;
+	fs_node_t *rfn;
 	
-	root = (tmpfs_dentry_t *) tmpfs_create_node(dev_handle, L_DIRECTORY);
-	if (!root) 
+	rfn = tmpfs_create_node(dev_handle, L_DIRECTORY);
+	if (!rfn) 
 		return false;
-	root->lnkcnt = 0;	/* FS root is not linked */
+	TMPFS_NODE(rfn)->lnkcnt = 0;	/* FS root is not linked */
 	return true;
 }
@@ -265,7 +266,7 @@
 }
 
-void *tmpfs_match(void *prnt, const char *component)
-{
-	tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt;
+fs_node_t *tmpfs_match(fs_node_t *pfn, const char *component)
+{
+	tmpfs_dentry_t *parentp = TMPFS_NODE(pfn);
 	tmpfs_dentry_t *childp = parentp->child;
 
@@ -273,9 +274,8 @@
 		childp = childp->sibling;
 
-	return (void *) childp;
-}
-
-void *
-tmpfs_node_get(dev_handle_t dev_handle, fs_index_t index)
+	return FS_NODE(childp);
+}
+
+fs_node_t *tmpfs_node_get(dev_handle_t dev_handle, fs_index_t index)
 {
 	unsigned long key[] = {
@@ -286,24 +286,32 @@
 	if (!lnk)
 		return NULL;
-	return hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link); 
-}
-
-void tmpfs_node_put(void *node)
+	return FS_NODE(hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link));
+}
+
+void tmpfs_node_put(fs_node_t *fn)
 {
 	/* nothing to do */
 }
 
-void *tmpfs_create_node(dev_handle_t dev_handle, int lflag)
+fs_node_t *tmpfs_create_node(dev_handle_t dev_handle, int lflag)
 {
 	assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY));
 
+	fs_node_t *fn = malloc(sizeof(fs_node_t));
+	if (!fn)
+		return NULL;
+	
 	tmpfs_dentry_t *node = malloc(sizeof(tmpfs_dentry_t));
-	if (!node)
+	if (!node) {
+		free(fn);
 		return NULL;
-
+	}
 	if (!tmpfs_dentry_initialize(node)) {
+		free(fn);
 		free(node);
 		return NULL;
 	}
+	fn->data = node;
+	node->bp = fn;	/* establish the back pointer */
 	if (!tmpfs_root_get(dev_handle))
 		node->index = TMPFS_SOME_ROOT;
@@ -322,11 +330,11 @@
 	};
 	hash_table_insert(&dentries, key, &node->dh_link);
-	return (void *) node;
-}
-
-int tmpfs_link_node(void *prnt, void *chld, const char *nm)
-{
-	tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt;
-	tmpfs_dentry_t *childp = (tmpfs_dentry_t *) chld;
+	return fn;
+}
+
+int tmpfs_link_node(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
+{
+	tmpfs_dentry_t *parentp = TMPFS_NODE(pfn);
+	tmpfs_dentry_t *childp = TMPFS_NODE(cfn);
 
 	assert(parentp->type == TMPFS_DIRECTORY);
@@ -363,8 +371,8 @@
 }
 
-int tmpfs_unlink_node(void *prnt, void *chld)
-{
-	tmpfs_dentry_t *parentp = (tmpfs_dentry_t *)prnt;
-	tmpfs_dentry_t *childp = (tmpfs_dentry_t *)chld;
+int tmpfs_unlink_node(fs_node_t *pfn, fs_node_t *cfn)
+{
+	tmpfs_dentry_t *parentp = TMPFS_NODE(pfn);
+	tmpfs_dentry_t *childp = TMPFS_NODE(cfn);
 
 	if (!parentp)
@@ -393,7 +401,7 @@
 }
 
-int tmpfs_destroy_node(void *nodep)
-{
-	tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep;
+int tmpfs_destroy_node(fs_node_t *fn)
+{
+	tmpfs_dentry_t *dentry = TMPFS_NODE(fn);
 	
 	assert(!dentry->lnkcnt);
@@ -411,4 +419,5 @@
 	if (dentry->type == TMPFS_FILE)
 		free(dentry->data);
+	free(dentry->bp);
 	free(dentry);
 	return EOK;
@@ -447,5 +456,5 @@
 	}
 
-	tmpfs_dentry_t *root = tmpfs_root_get(dev_handle);
+	tmpfs_dentry_t *root = TMPFS_NODE(tmpfs_root_get(dev_handle));
 	if (str_cmp(opts, "restore") == 0) {
 		if (tmpfs_restore(dev_handle))
@@ -673,5 +682,5 @@
 	tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t,
 	    dh_link);
-	rc = tmpfs_destroy_node(dentry);
+	rc = tmpfs_destroy_node(FS_NODE(dentry));
 	ipc_answer_0(rid, rc);
 }
