Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 09514955a61b0a6dd50180e2c5251ba88abad1ef)
+++ uspace/srv/fs/fat/fat_ops.c	(revision b0247bac85a54efd0a8b8a1901d781dec1d3520b)
@@ -267,13 +267,8 @@
 	bps = uint16_t_le2host(FAT_BS(bb)->bps);
 	dps = bps / sizeof(fat_dentry_t);
-	blocks = parentp->size / bps + (parentp->size % bps != 0);
+	blocks = parentp->size / bps;
 	for (i = 0; i < blocks; i++) {
-		unsigned dentries;
-		
 		b = fat_block_get(bb->data, parentp, i);
-		dentries = (i == blocks - 1) ?
-		    parentp->size % sizeof(fat_dentry_t) :
-		    dps;
-		for (j = 0; j < dentries; j++) { 
+		for (j = 0; j < dps; j++) { 
 			d = ((fat_dentry_t *)b->data) + j;
 			switch (fat_classify_dentry(d)) {
@@ -356,5 +351,5 @@
 	if (nodep->type != FAT_DIRECTORY)
 		return false;
-
+	
 	futex_down(&nodep->idx->lock);
 	bb = block_get(nodep->idx->dev_handle, BS_BLOCK, BS_SIZE);
@@ -362,15 +357,11 @@
 	dps = bps / sizeof(fat_dentry_t);
 
-	blocks = nodep->size / bps + (nodep->size % bps != 0);
+	blocks = nodep->size / bps;
 
 	for (i = 0; i < blocks; i++) {
-		unsigned dentries;
 		fat_dentry_t *d;
 	
 		b = fat_block_get(bb->data, nodep, i);
-		dentries = (i == blocks - 1) ?
-		    nodep->size % sizeof(fat_dentry_t) :
-		    dps;
-		for (j = 0; j < dentries; j++) {
+		for (j = 0; j < dps; j++) {
 			d = ((fat_dentry_t *)b->data) + j;
 			switch (fat_classify_dentry(d)) {
