projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c4dce1
)
util/fossilize_db: Unlock the cache file if the entry already exists.
author
Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl>
Sat, 7 Aug 2021 21:23:56 +0000
(23:23 +0200)
committer
Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl>
Sun, 8 Aug 2021 11:34:39 +0000
(13:34 +0200)
Fixes:
4f0f8133a35
"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>
src/util/fossilize_db.c
patch
|
blob
|
history
diff --git
a/src/util/fossilize_db.c
b/src/util/fossilize_db.c
index
d3c039e
..
013575a
100644
(file)
--- 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;
}