The logic to sleep longer was the wrong way around.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
while ((dev = yaffs_next_dev()) != NULL) {
result = yaffs_do_background_gc_reldev(dev, urgent);
while ((dev = yaffs_next_dev()) != NULL) {
result = yaffs_do_background_gc_reldev(dev, urgent);
+
+ /* result is 1 if more than half the free space is
+ * erased.
+ * If less than half the free space is erased then it is
+ * worth doing another background_gc operation sooner.
+ */
+ if (result == 0)