Subject: Re: [PATCH v5 18/35] commit_lock_file(): if close fails, roll back

From: Jonathan Nieder <[email-masked]>
Date: Tue, 16 Sep 2014 15:19:56 -0700

Michael Haggerty wrote:

> If closing an open lockfile fails, then we cannot be sure of the
> contents of the lockfile

Is that true?  It seems more like a bug in close_lock_file: if it
fails, perhaps it should either set lk->fd back to fd or unlink the
lockfile itself.

What do other callers do on close_lock_file failure?

Jonathan