Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision 778d26d62626df8516314e2b4d5e4a599e15c9bc)
+++ uspace/srv/vfs/vfs.h	(revision b7c62a99d8505fbceabebd8655bcb200d89ed7c0)
@@ -94,5 +94,4 @@
 	vfs_node_type_t type;
 	aoff64_t size;
-	unsigned int lnkcnt;
 } vfs_lookup_res_t;
 
@@ -110,7 +109,4 @@
 	unsigned refcnt;
 	
-	/** Number of names this node has in the file system namespace. */
-	unsigned lnkcnt;
-
 	ht_link_t nh_link;		/**< Node hash-table link. */
 
Index: uspace/srv/vfs/vfs_lookup.c
===================================================================
--- uspace/srv/vfs/vfs_lookup.c	(revision 778d26d62626df8516314e2b4d5e4a599e15c9bc)
+++ uspace/srv/vfs/vfs_lookup.c	(revision b7c62a99d8505fbceabebd8655bcb200d89ed7c0)
@@ -280,13 +280,5 @@
 	result->size =
 	    (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(answer), IPC_GET_ARG4(answer));
-	result->lnkcnt = (unsigned int) IPC_GET_ARG5(answer);
-	
-	if (lflag & L_FILE)
-		result->type = VFS_NODE_FILE;
-	else if (lflag & L_DIRECTORY)
-		result->type = VFS_NODE_DIRECTORY;
-	else
-		result->type = VFS_NODE_UNKNOWN;
-
+	result->type = IPC_GET_ARG5(answer);
 	rc = EOK;
 
Index: uspace/srv/vfs/vfs_node.c
===================================================================
--- uspace/srv/vfs/vfs_node.c	(revision 778d26d62626df8516314e2b4d5e4a599e15c9bc)
+++ uspace/srv/vfs/vfs_node.c	(revision b7c62a99d8505fbceabebd8655bcb200d89ed7c0)
@@ -106,10 +106,10 @@
 void vfs_node_delref(vfs_node_t *node)
 {
-	bool free_vfs_node = false;
-	bool free_fs_node = false;
-	
-	fibril_mutex_lock(&nodes_mutex);
-	
-	if (node->refcnt-- == 1) {
+	bool free_node = false;
+	
+	fibril_mutex_lock(&nodes_mutex);
+	
+	node->refcnt--;
+	if (node->refcnt == 0) {
 		
 		/*
@@ -119,29 +119,21 @@
 		
 		hash_table_remove_item(&nodes, &node->nh_link);
-		free_vfs_node = true;
-		
-		if (!node->lnkcnt)
-			free_fs_node = true;
+		free_node = true;
 	}
 	
 	fibril_mutex_unlock(&nodes_mutex);
 	
-	if (free_fs_node) {
-		
+	if (free_node) {
 		/*
-		 * The node is not visible in the file system namespace.
-		 * Free up its resources.
+		 * DESTROY will free up the file's resources if there are no more hard links.
 		 */
 		
 		async_exch_t *exch = vfs_exchange_grab(node->fs_handle);
-		sysarg_t rc = async_req_2_0(exch, VFS_OUT_DESTROY,
-		    (sysarg_t) node->service_id, (sysarg_t)node->index);
-		
-		assert(rc == EOK);
+		async_msg_2(exch, VFS_OUT_DESTROY,
+			(sysarg_t) node->service_id, (sysarg_t)node->index);
 		vfs_exchange_release(exch);
+
+		free(node);
 	}
-	
-	if (free_vfs_node)
-		free(node);
 }
 
@@ -190,5 +182,4 @@
 		node->index = result->triplet.index;
 		node->size = result->size;
-		node->lnkcnt = result->lnkcnt;
 		node->type = result->type;
 		fibril_rwlock_initialize(&node->contents_rwlock);
@@ -196,14 +187,5 @@
 	} else {
 		node = hash_table_get_inst(tmp, vfs_node_t, nh_link);
-		if (node->type == VFS_NODE_UNKNOWN &&
-		    result->type != VFS_NODE_UNKNOWN) {
-			/* Upgrade the node type. */
-			node->type = result->type;
-		}
 	}
-
-	assert(node->size == result->size || node->type != VFS_NODE_FILE);
-	assert(node->lnkcnt == result->lnkcnt);
-	assert(node->type == result->type || result->type == VFS_NODE_UNKNOWN);
 
 	_vfs_node_addref(node);
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 778d26d62626df8516314e2b4d5e4a599e15c9bc)
+++ uspace/srv/vfs/vfs_ops.c	(revision b7c62a99d8505fbceabebd8655bcb200d89ed7c0)
@@ -79,5 +79,4 @@
 	fs_index_t rindex;
 	aoff64_t rsize;
-	unsigned rlnkcnt;
 	async_exch_t *exch;
 	sysarg_t rc;
@@ -130,5 +129,4 @@
 		rsize = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(answer),
 		    IPC_GET_ARG3(answer));
-		rlnkcnt = (unsigned) IPC_GET_ARG4(answer);
 		
 		mr_res.triplet.fs_handle = fs_handle;
@@ -136,5 +134,4 @@
 		mr_res.triplet.index = rindex;
 		mr_res.size = rsize;
-		mr_res.lnkcnt = rlnkcnt;
 		mr_res.type = VFS_NODE_DIRECTORY;
 			
@@ -237,5 +234,4 @@
 		rsize = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG2(answer),
 		    IPC_GET_ARG3(answer));
-		rlnkcnt = (unsigned) IPC_GET_ARG4(answer);
 		
 		mr_res.triplet.fs_handle = fs_handle;
@@ -243,5 +239,4 @@
 		mr_res.triplet.index = rindex;
 		mr_res.size = rsize;
-		mr_res.lnkcnt = rlnkcnt;
 		mr_res.type = VFS_NODE_DIRECTORY;
 		
@@ -668,6 +663,4 @@
 	file->open_write = false;
 	
-	vfs_node_addref(node);
-	vfs_node_put(node);
 	vfs_file_put(file);
 	if (parent) {
@@ -858,6 +851,7 @@
 	size_t bytes = IPC_GET_ARG1(answer);
 	
-	if (file->node->type == VFS_NODE_DIRECTORY)
+	if (file->node->type == VFS_NODE_DIRECTORY) {
 		fibril_rwlock_read_unlock(&namespace_rwlock);
+	}
 	
 	/* Unlock the VFS node. */
@@ -1120,7 +1114,5 @@
 	 * VFS_OUT_DESTROY'ed after the last reference to it is dropped.
 	 */
-	vfs_node_t *node = vfs_node_get(&lr);
-	vfs_node_delref(node);
-	vfs_node_put(node);
+	vfs_node_put(vfs_node_get(&lr));
 
 exit:
@@ -1225,7 +1217,5 @@
 	
 	if (orig_unlinked) {
-		vfs_node_t *node = vfs_node_get(&new_lr_orig);
-		vfs_node_delref(node);
-		vfs_node_put(node);
+		vfs_node_put(vfs_node_get(&new_lr_orig));
 	}
 	
