lib/commit: Add repository locking during transactions

Take a shared repo lock during a transaction to ensure that another
process doesn't delete objects.

Closes: #1343
Approved by: cgwalters
This commit is contained in:
Dan Nicholson authored and Atomic Bot committed 2017-12-05 02:32:47 +00:00
1 parent 7d863ed9e4
commit 6d978893f1
2 files changed
+22

No files matched your search

+1
View File
@@ -122,6 +122,7 @@ struct OstreeRepo {
GMutex txn_lock;
OstreeRepoTxn txn;
gboolean txn_locked;
GMutex cache_lock;
guint dirmeta_cache_refcount;