llcache: Persist anything available during llcache_finalise

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-02-23 20:52:17 +00:00
parent 088917641f
commit ac75a9161e
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 5 additions and 0 deletions

View File

@ -3769,6 +3769,11 @@ void llcache_finalise(void)
llcache_object *object, *next;
uint64_t total_bandwidth = 0; /* total bandwidth */
/* Attempt to persist anything we have left lying around */
llcache_persist(NULL);
/* Now clear the persistence callback */
guit->misc->schedule(-1, llcache_persist, NULL);
/* Clean uncached objects */
for (object = llcache->uncached_objects; object != NULL; object = next) {
llcache_object_user *user, *next_user;