Subject: Re: Locking errors
To: Charles M. Hannum <root@ihack.net>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 02/01/1999 09:54:43
On Mon, 1 Feb 1999, Charles M. Hannum wrote:

> The confusion with whether the vnode is locked for VOP_CLOSE should
> probably be resolved.  However, I find it completely unacceptable to
> hack up other parts of the interface to reach some unstated goal.
> Please state the problem you're trying to solve *before* suggesting
> bizarre changes to the existing code (which may very well break other
> things) to solve it.

I want to be able to:

vn_lock(vp);

Update stuff in extra fields in a large inode

VOP_UNLOCK(vp);

Right now I can't even:

vn_lock(vp);
VOP_UNLOCK(vp);


Since VOP_CLOSE is supposed to be passed an unlocked vnode, I really
should lock the vnode to touch it. Especially as all my other access
routines only touch the node while its locked.



So, to summarize, all I want to do is change things so that VOP_CLOSE
routines can lock the vnode they are closing.

Take care,

Bill