panic: lock (sleep mutex) vnode interlock not locked

Don Lewis truckman at
Wed Aug 10 16:42:56 GMT 2005

On 10 Aug, Suleiman Souhlal wrote:
> Hello,
> On Aug 10, 2005, at 12:18 PM, Suleiman Souhlal wrote:
>> Hi,
>> On Aug 10, 2005, at 12:02 PM, Don Lewis wrote:
>>> What is preventing VI_DOOMED from being set while we're waiting for
>>> VOP_LOCK()?  Contrary to what the VOP_LOCK(9) man page says about
>>> LK_INTERLOCK, it looks like lockmgr() drops the vnode interlock  
>>> before
>>> it attempts to grab the vnode lock.
>> VI_DOOMED is only set by vgonel(), and it requires both the vnode  
>> and the interlock locked.
> I read your message a bit too fast. I think you are right. We should  
> probably move the check for VI_DOOMED etc, after we've acquired the  
> vnode lock.

If you just move the test, you'll probably want to add LK_NOWAIT to the
VOP_LOCK() call to avoid stalling on a vnode that is in use.

More information about the freebsd-current mailing list