Re: [PATCH v4 06/32] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-09-12 Thread Michael Haggerty
On 09/10/2014 12:39 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> If the call to adjust_shared_perm() fails, lock_file returns -1, which >> to the caller looks like any other failure to lock the file. So in >> this case, roll back the lockfile before returning so that the lock >> fil

Re: [PATCH v4 06/32] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-09-09 Thread Junio C Hamano
Michael Haggerty writes: > If the call to adjust_shared_perm() fails, lock_file returns -1, which > to the caller looks like any other failure to lock the file. So in > this case, roll back the lockfile before returning so that the lock > file is deleted immediately and the lockfile object is le

[PATCH v4 06/32] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-09-06 Thread Michael Haggerty
If the call to adjust_shared_perm() fails, lock_file returns -1, which to the caller looks like any other failure to lock the file. So in this case, roll back the lockfile before returning so that the lock file is deleted immediately and the lockfile object is left in a predictable state (namely,