lib/repo: Verify txn stagedir existence after locking
authorColin Walters <walters@verbum.org>
Tue, 28 Nov 2017 18:03:00 +0000 (13:03 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 1 Dec 2017 19:00:18 +0000 (19:00 +0000)
commit5ef8faff9a10f055401df5265e389ba9bbb89786
tree303f41ec89da276cda41bfc8a3601f92f215df2d
parent4eae6529ed478e9a6fa55fc43f127043ff4db287
lib/repo: Verify txn stagedir existence after locking

This squashes the last race condition I was actively hitting while running
`test-concurrency.py` in a loop. The race is when process A finds a tmpdir to
reuse, and goes to lock it. Meanwhile process B deletes it and unlocks the lock.
Process A then succeeds at grabbing a lock, but the tmpdir is deleted.

Closes: #1352
Approved by: dbnicholson
src/libostree/ostree-repo.c