mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
util/fossilize_db: don't destroy foz on RO load fail
When loading multiple RO foz dbs, if a db fails to load, continue trying to load other RO foz dbs instead of destroying the foz cache. Preserve destroying the foz cache and not preceding to load RO caches if the RW cache fails to load. Signed-off-by: Juston Li <justonli@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19328>
This commit is contained in:
parent
4c19426fd6
commit
483ee5d6ba
1 changed files with 4 additions and 2 deletions
|
|
@ -259,7 +259,6 @@ load_foz_dbs(struct foz_db *foz_db, FILE *db_idx, uint8_t file_idx,
|
|||
|
||||
fail:
|
||||
flock(fileno(foz_db->file[file_idx]), LOCK_UN);
|
||||
foz_destroy(foz_db);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -333,7 +332,10 @@ foz_prepare(struct foz_db *foz_db, char *cache_path)
|
|||
|
||||
if (!load_foz_dbs(foz_db, db_idx, file_idx, true)) {
|
||||
fclose(db_idx);
|
||||
goto fail;
|
||||
fclose(foz_db->file[file_idx]);
|
||||
foz_db->file[file_idx] = NULL;
|
||||
|
||||
continue; /* Ignore invalid user provided foz db */
|
||||
}
|
||||
|
||||
fclose(db_idx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue