Subject: Re: Locking errors
To: Frank van der Linden <frank@wins.uva.nl>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 02/01/1999 20:46:03
On Sun, 31 Jan 1999, Frank van der Linden wrote:

> I think introducing a VXLOCK1 flag will just further obfuscate
> things. Maybe you should look at:
> 
> 	c) Make VOP_CLOSE aware of the locking and VXLOCK status.

Jason talked me into a modified version of c). Rather than teaching
VOP_CLOSE about locked & VXLOCK state, re-define it so that it takes a
locked vnode. Then what I need to do is ok (the node's locked, so I don't
need to lock it myself) AND (drum roll)

nfs_close already seems to expect a locked vnode. It calls routines, such
as vinvalbuf (indirectly via nfs_vinvalbuf) which expect a locked vnode.
And it sure looks like it wants a locked node.....

This would mean wrapping all the current calls to VOP_CLOSE with
vn_lock/VOP_UNLOCK, but that's not hard.

I'll try a kernel with these mods tomorrow and see what happens.

Take care,

Bill