On Thu, Jun 17, 2004 at 10:50:25AM -0700, Bill Studenmund wrote: > On Thu, Jun 17, 2004 at 11:02:07AM +0900, YAMAMOTO Takashi wrote: > > 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. Let me re-state this. The whole reason I added PDIRUNLOCK was for the error case when we didn't get to re-lock dvp. Yes, VOP_LOOKUP() is supposed to have it locked in the error case, and I agree it's really rare that it won't work. But that's its purpose. Also, it's to facilitate lock coordination, to let layered file systems know if something strange happened so they can adapt. Given that its whole purpose is to help with the error case, you could just not bother re-locking the parent directory if the layer create fails. Take care, Bill
Attachment:
pgproGmAxPFwX.pgp
Description: PGP signature