Re: [PATCH 1/1] lock_packed_refs(): fix cache validity check
- From
Jeff King <peff@peff.net>
- Date
- Jun 12, 2017, 18:21 UTC
- Message-ID
- <20170612182142.6giu6ovjwx2fjkzp@sigill.intra.peff.net>
- In-Reply-To
- <18f059555ce0e4f46fba783973947f6a26ac4b65.1497253685.git.mhagger@alum.mit.edu>
On Mon, Jun 12, 2017 at 10:06:13AM +0200, Michael Haggerty wrote:
Show 12 quoted lines
> So instead: > > * Extract a function `validate_packed_ref_cache()` that does the > validity check independent of whether the lock is held. > > * Change `get_packed_ref_cache()` to call the new function, but only > if the lock *isn't* held. > > * Change `lock_packed_refs()` to call the new function in any case > before calling `get_packed_ref_cache()`. > > * Fix the comment in `lock_packed_refs()`.
Your explanation makes perfect sense, and I agree this should fix the problem. Sorry to have missed it in review.
-Peff