X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.c;h=42e234a73f56852b4d5760733c3f9ec59e3ae076;hp=65e33a644b958c09b946f8a14c80d3bcbf933a05;hb=36dc48ebac4140345b3f5955d5013f6c22ad827a;hpb=c565b5da13774bc9d5f661d93a127ba86a8769e7 diff --git a/yaffs_guts.c b/yaffs_guts.c index 65e33a6..42e234a 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -3428,8 +3428,10 @@ static unsigned yaffs_FindBlockForGarbageCollection(yaffs_Device *dev, int maxThreshold = dev->param.nChunksPerBlock/2; threshold = background ? (dev->gcNotDone + 2) * 2 : 0; - threshold = max(threshold, YAFFS_GC_PASSIVE_THRESHOLD); - threshold = min(threshold, maxThreshold); + if(threshold maxThreshold) + threshold = maxThreshold; iterations = nBlocks / 16 + 1; if (iterations > 100)