On Sun, Oct 01, 2017 at 04:56:08PM +0200, Martin Ågren wrote: > Similar to a previous patch, we do not need to use `newfd` to signal > that we have a lockfile to clean up. We can just unconditionally call > `rollback_lock_file`. If we do not hold the lock, it will be a no-op. > > Where we check `newfd` to decide whether we need to take the lock, we > can instead use `is_lock_file_locked()`. Looks good. I was surprised you didn't have to replace any writing to "newfd". But the writing it all happens via write_locked_index(), which directly accesses the lock's fd member. -Peff