Переглянути джерело

Merge pull request #380 from ghalliday/issue378

FIX gh-378 Exit cache loop early (common case)

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 роки тому
батько
коміт
ad4de1debd
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      system/jlib/jfile.cpp

+ 3 - 0
system/jlib/jfile.cpp

@@ -6233,6 +6233,9 @@ public:
             if (!oldest)
                 break;
             oldest->cachedio.clear();
+            //If previously had max ios then we now have space.
+            if (n == max)
+                break;
         }
     }