util/fossilize_db: Unlock the cache file if the entry already exists.
Fixes: 4f0f8133a3
"util/fossilize_db: Do not lock the fossilize db permanently."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12266>
This commit is contained in:
parent
1c4dce1aa7
commit
75266ee44a
|
@ -448,6 +448,7 @@ foz_write_entry(struct foz_db *foz_db, const uint8_t *cache_key_160bit,
|
||||||
_mesa_hash_table_u64_search(foz_db->index_db, hash);
|
_mesa_hash_table_u64_search(foz_db->index_db, hash);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
simple_mtx_unlock(&foz_db->mtx);
|
simple_mtx_unlock(&foz_db->mtx);
|
||||||
|
flock(fileno(foz_db->file[0]), LOCK_UN);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue