Re: [PATCH 3/5] refs.c: drop dead code checking lock status in `delete_pseudoref()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 06, 2018 at 04:10:29PM +0200, Martin Ågren wrote:

> After taking the lock we check whether we got it and die otherwise. But
> since we take the lock using `LOCK_DIE_ON_ERROR`, we would already have
> died.
> 
> Unlike in the previous patch, this function is not prepared for
> indicating errors via a `strbuf err`, so let's just drop the dead code.
> Any improved error-handling can be added later.

I suspect this ought to eventually be converted to return an error, to
match the rest of the refs code. And in that sense, this is a step
backwards versus leaving the current die_errno in place and dropping the
LOCK_DIE_ON_ERROR flag. But it probably doesn't matter much either way,
and whoever does the conversion later can deal with it.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux