X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.c;h=9872305f6c1ff26b59ffb3185245f031313ff266;hp=81ae37a400425ae696818bfa0cdd2180f6e4ba58;hb=84875495636bc4c91fa330851f25af98325aa38e;hpb=870a75229102c3d8922a465f0edcbb20ea4e996e diff --git a/yaffs_guts.c b/yaffs_guts.c index 81ae37a..9872305 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.86 2009-07-28 03:04:54 charles Exp $"; + "$Id: yaffs_guts.c,v 1.87 2009-07-29 04:30:24 charles Exp $"; #include "yportenv.h" @@ -2969,7 +2969,6 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block, isCheckpointBlock = (bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT); - bi->blockState = YAFFS_BLOCK_STATE_COLLECTING; T(YAFFS_TRACE_TRACING, (TSTR("Collecting block %d, in use %d, shrink %d, wholeBlock %d" TENDSTR), @@ -2980,6 +2979,9 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev, int block, /*yaffs_VerifyFreeChunks(dev); */ + if(bi->blockState == YAFFS_BLOCK_STATE_FULL) + bi->blockState = YAFFS_BLOCK_STATE_COLLECTING; + bi->hasShrinkHeader = 0; /* clear the flag so that the block can erase */ /* Take off the number of soft deleted entries because