From: charles Date: Mon, 8 Jun 2009 23:50:44 +0000 (+0000) Subject: Only subtract softDeletions once ber block gc. X-Git-Tag: pre-name-change~205 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=51bd6245e2a5ffab0befa6aace5510b6e45ffa27 Only subtract softDeletions once ber block gc. --- diff --git a/yaffs_guts.c b/yaffs_guts.c index 0db60b9..33ba5e6 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -12,7 +12,7 @@ */ const char *yaffs_guts_c_version = - "$Id: yaffs_guts.c,v 1.84 2009-05-26 04:50:08 charles Exp $"; + "$Id: yaffs_guts.c,v 1.85 2009-06-08 23:50:44 charles Exp $"; #include "yportenv.h" @@ -2985,7 +2985,8 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block, /* 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;