Index: uspace/srv/fs/minixfs/mfs_inode.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_inode.c	(revision 1494e5271dd08d4d05d0e2ba10c00d006bb32765)
+++ uspace/srv/fs/minixfs/mfs_inode.c	(revision e5cebc92f3b58a12ebfca2c702faf9e64100bcdd)
@@ -323,8 +323,8 @@
 	/*Compute the number of zones to add to the inode*/
 	unsigned zones_to_add = 0;
-	if ((old_size % (bs - 1)) == 0)
-		zones_to_add++;
-
-	zones_to_add += (new_size - old_size) / bs;
+	if (old_size == 0)
+		++zones_to_add;
+
+	zones_to_add += (new_size / bs) - (old_size / bs);
 
 	/*Compute the start zone*/
@@ -333,11 +333,4 @@
 
 	mfsdebug("zones to add = %u\n", zones_to_add);
-
-	if (zones_to_add == 0) {
-		/*Set the new inode size and exit*/
-		ino_i->i_size = new_size;
-		ino_i->dirty = true;
-		return EOK;
-	}
 
 	int r;
@@ -350,5 +343,17 @@
 			return r;
 
-		r = write_map(mnode, (start_zone + i) * sbi->block_size,
+		mfsdebug("write_map = %d\n", (int) ((start_zone + i) * bs));
+
+		block_t *b;
+		r = block_get(&b, mnode->instance->handle, new_zone,
+						BLOCK_FLAGS_NOREAD);
+		if (r != EOK)
+			return r;
+
+		memset(b->data, 0, bs);
+		b->dirty = true;
+		block_put(b);
+
+		r = write_map(mnode, (start_zone + i) * bs,
 				new_zone, &dummy);
 		if (r != EOK)
@@ -358,4 +363,8 @@
 		ino_i->dirty = true;
 	}
+
+	ino_i->i_size = new_size;
+	ino_i->dirty = true;
+
 	return EOK;
 }
