From 75266ee44a07cc97125511f5129adb8e696e3bdc Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 7 Aug 2021 23:23:56 +0200 Subject: [PATCH] util/fossilize_db: Unlock the cache file if the entry already exists. Fixes: 4f0f8133a35 "util/fossilize_db: Do not lock the fossilize db permanently." Reviewed-by: Timothy Arceri Part-of: --- src/util/fossilize_db.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/fossilize_db.c b/src/util/fossilize_db.c index d3c039e90d3..013575a67a1 100644 --- a/src/util/fossilize_db.c +++ b/src/util/fossilize_db.c @@ -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); if (entry) { simple_mtx_unlock(&foz_db->mtx); + flock(fileno(foz_db->file[0]), LOCK_UN); return NULL; }