X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=yaffs_guts.c;h=ebe7e772ea7a86a2177c4be11604d449db8a11b8;hb=refs%2Fheads%2Faleph1-release-branch;hp=f910f386dfdb5a33d86a19b4069ee951d887e804;hpb=55c18cfca44ed18e9501ddbde3a3361b4f377739;p=yaffs2.git diff --git a/yaffs_guts.c b/yaffs_guts.c index f910f38..ebe7e77 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -10,6 +10,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ + #include "yportenv.h" #include "yaffs_trace.h" @@ -431,9 +432,9 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev, /* let's give it a try */ attempts++; -#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED - bi->skipErasedCheck = 0; -#endif + if(dev->param.alwaysCheckErased) + bi->skipErasedCheck = 0; + if (!bi->skipErasedCheck) { erasedOk = yaffs_CheckChunkErased(dev, chunk); if (erasedOk != YAFFS_OK) {