changeset 121:d02f0fbee6ee

Fix free space reporting as per Mikhail Rileev's patch
author charles
date Wed, 08 Feb 2006 22:29:14 +0000
parents 8d8735105bd4
children 5dbd6682bfb2
files yaffs_guts.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_guts.c
+++ b/yaffs_guts.c
@@ -2347,6 +2347,7 @@ static int yaffs_GarbageCollectBlock(yaf
 				   ("yaffs: About to finally delete object %d"
 				    TENDSTR), object->objectId));
 				yaffs_DoGenericObjectDeletion(object);
+				object->myDev->nDeletedFiles--;
 			}
 
 		}
@@ -5691,6 +5692,8 @@ int yaffs_GetNumberOfFreeChunks(yaffs_De
 	nFree = yaffs_CountFreeChunks(dev);
 #endif
 
+	nFree += dev->nDeletedFiles;
+	
 	/* Now count the number of dirty chunks in the cache and subtract those */
 
 	{