Index: uspace/srv/fs/fat/fat_idx.c
===================================================================
--- uspace/srv/fs/fat/fat_idx.c	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
+++ uspace/srv/fs/fat/fat_idx.c	(revision a281fc8217c0fce5209fbd69b047d8a62040bb7a)
@@ -164,4 +164,6 @@
 		assert((keys == 1) || (keys == 3));
 	}
+
+	return 0;
 }
 
@@ -219,4 +221,6 @@
 		assert((keys == 1) || (keys == 2));
 	}
+
+	return 0;
 }
 
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 4cac2d69158253d6b2ffb0a43fa4dc39390f104f)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision a281fc8217c0fce5209fbd69b047d8a62040bb7a)
@@ -168,6 +168,8 @@
 		    (nodep->index == key[NODES_KEY_INDEX]));
 	default:
-		abort();
-	}
+		assert((keys == 1) || (keys == 2));
+	}
+
+	return 0;
 }
 
@@ -439,11 +441,21 @@
 {
 	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_node_t *rootfn;
+	int rc;
 	
-	/* Accept the mount options */
+	/* Accept the mount options. */
 	char *opts;
-	int rc = async_data_write_accept((void **) &opts, true, 0, 0, 0, NULL);
-	
+	rc = async_data_write_accept((void **) &opts, true, 0, 0, 0, NULL);
 	if (rc != EOK) {
 		ipc_answer_0(rid, rc);
+		return;
+	}
+
+	/* Check if this device is not already mounted. */
+	rc = tmpfs_root_get(&rootfn, dev_handle);
+	if ((rc == EOK) && (rootfn)) {
+		(void) tmpfs_node_put(rootfn);
+		free(opts);
+		ipc_answer_0(rid, EEXIST);
 		return;
 	}
@@ -456,5 +468,4 @@
 	}
 
-	fs_node_t *rootfn;
 	rc = tmpfs_root_get(&rootfn, dev_handle);
 	assert(rc == EOK);
