David Young <dyo...@pobox.com> wrote:
> Previously, the code distinguished garbage collection, locking
> acquisition, and resource-reclamation from each other by using
> more, and more meaningful, subroutine names.  Also, in the common
> case, it collected and reclaimed garbage immediately at the end of
> config_detach(9) instead of at some arbitrary time in the future (for
> example, in the next call to device_lookup()).
> 
> Your change obfuscates the code and needlessly postpones a lot of
> garbage collection.  Please back it out.

Your code had local a list of devices to G/C - it is redundant.  Having
resource freeing/destroying tied with last unlock operation will make sure
that it wont be done with locks held - that is a common way.  Perhaps
names "lock/unlock" confuse you?  It can be "enter/exit" or similar.

Can you explain "arbitrary time in the future" and "needlessly postpones"?
It does not change the previous behaviour.

-- 
Mindaugas

Reply via email to