[OpenAFS-devel] OpenAFS for FreeBSD 5.2 patch

Garrett Wollman wollman@khavrinen.lcs.mit.edu
Fri, 19 Mar 2004 14:56:26 -0500 (EST)


<<On Fri, 19 Mar 2004 14:12:10 -0500, Jim Rees <rees@umich.edu> said:

> It looks like osi_VM_TryToSmush used to only acquire the vnode interlock,
> and Garrett went to great lengths to change it so that it locks the vnode
> instead.

Generally speaking, there are only four things you can legitimately
do while holding the vnode interlock:

- Frob those flags which are locked by the interlock.
- Call vget() with LK_INTERLOCK set in the flags argument.
- Call VOP_LOCK() with LK_INTERLOCK set in the flags argument.
- Call VI_UNLOCK().

In particular, you can't call VOP_GETVOBJECT(), which this function
has to do in order to perform its function.

-GAWollman