Source-Changes archive

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

Re: CVS commit: src/sys/miscfs



On Thu, Jun 17, 2004 at 11:02:07AM +0900, YAMAMOTO Takashi wrote:
> > > how can vn_lock(LK_EXCLUSIVE | LK_RETRY) fail in this case?
> > 
> > Somehow the lock is dying.
> 
> dying?  can you please be more specific?

Lock being drained, for instance. Specifically for PDIRUNLOCKED the main 
point was to handle errors in looking up '..'. If there's an error getting 
'..' and we can't then re-lock '.', this flag tells callers something 
happened.

> > Yes, for it to happen we have to have
> > wandered into the weeds, but this code methodology is to try and help us 
> > get somewhere a bit safer. i.e. not add more error states on top if we 
> > don't have to.
> 
> we have many code which assume that vn_lock with LK_RETRY never fails.
> are you going to add error checks on all of them?
> i think that it just bloats the code without any benefits.

The difference here is that you're changing the state of PDIRUNLOCK. Don't 
clear it if you don't know the lock succeeded.

Take care,

Bill

Attachment: pgptweLII5Sjw.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index