changeset 293:d66ba616b510

Only subtract softDeletions once ber block gc.
author charles
date Tue, 09 Jun 2009 00:50:44 +0100
parents 9e100133041b
children 671aa2b5ed92
files yaffs_guts.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_guts.c
+++ b/yaffs_guts.c
@@ -2985,7 +2985,8 @@ static int yaffs_GarbageCollectBlock(yaf
 	/* Take off the number of soft deleted entries because
 	 * they're going to get really deleted during GC.
 	 */
-	dev->nFreeChunks -= bi->softDeletions;
+	if(dev->gcChunk == 0) /* first time through for this block */
+		dev->nFreeChunks -= bi->softDeletions;
 
 	dev->isDoingGC = 1;