# HG changeset patch # User charles # Date 1268275483 0 # Node ID fe1a3db89fdec7a72834aec150d853b6a92ef440 # Parent eeb419b0c959e67ccdf1e49116fbcc812769d797 Update tags when rewriting object header during gc diff --git a/yaffs_guts.c b/yaffs_guts.c --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -12,7 +12,7 @@ */ const char *yaffs_guts_c_version = - "$Id: yaffs_guts.c,v 1.116 2010-03-09 04:12:00 charles Exp $"; + "$Id: yaffs_guts.c,v 1.117 2010-03-11 02:44:43 charles Exp $"; #include "yportenv.h" #include "yaffs_trace.h" @@ -3342,13 +3342,19 @@ static int yaffs_GarbageCollectBlock(yaf yaffs_ObjectHeader *oh; oh = (yaffs_ObjectHeader *)buffer; + oh->isShrink = 0; tags.extraIsShrinkHeader = 0; + oh->shadowsObject = 0; oh->inbandShadowsObject = 0; - if(object->variantType == YAFFS_OBJECT_TYPE_FILE) + tags.extraShadows = 0; + + /* Update file size */ + if(object->variantType == YAFFS_OBJECT_TYPE_FILE){ oh->fileSize = object->variant.fileVariant.fileSize; - tags.extraShadows = 0; + tags.extraFileLength = oh->fileSize; + } yaffs_VerifyObjectHeader(object, oh, &tags, 1); newChunk =