Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision 4637c72da21ae63d19637654eb772d0cdae5841a)
+++ uspace/srv/fs/fat/fat_fat.c	(revision db4ec8d433d5a57e9661bceeab3b1ffff2adb1ff)
@@ -545,30 +545,28 @@
 	dev_handle_t dev_handle = nodep->idx->dev_handle;
 	fat_cluster_t lastc;
-	uint16_t numc;
 	uint8_t fatno;
 	int rc;
 
-	if (nodep->lastc_cached_valid) {
-		lastc = nodep->lastc_cached_value;
-		nodep->lastc_cached_valid = false;
+	if (nodep->firstc == FAT_CLST_RES0) {
+		/* No clusters allocated to the node yet. */
+		nodep->firstc = mcl;
+		nodep->dirty = true;	/* need to sync node */
 	} else {
-		rc = fat_cluster_walk(bs, dev_handle, nodep->firstc, &lastc,
-		    &numc, (uint16_t) -1);
-		if (rc != EOK)
-			return rc;
-
-		if (numc == 0) {
-			/* No clusters allocated to the node yet. */
-			nodep->firstc = mcl;
-			nodep->dirty = true;	/* need to sync node */
-			return EOK;
+		if (nodep->lastc_cached_valid) {
+			lastc = nodep->lastc_cached_value;
+			nodep->lastc_cached_valid = false;
+		} else {
+			rc = fat_cluster_walk(bs, dev_handle, nodep->firstc,
+			    &lastc, NULL, (uint16_t) -1);
+			if (rc != EOK)
+				return rc;
 		}
-	}
-
-	for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
-		rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno, lastc,
-		    mcl);
-		if (rc != EOK)
-			return rc;
+
+		for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
+			rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno,
+			    lastc, mcl);
+			if (rc != EOK)
+				return rc;
+		}
 	}
 
