tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Removal of recursive vnode locks



Juergen Hannken-Illjes <hannken%eis.cs.tu-bs.de@localhost> wrote:
> 
> I propose to completely remove the concept of recursive vnode locks by
> eliminating vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
> 

Definitely, and they should never come back.

-       lockcnt = lvp->v_lock.vl_recursecnt +
-           rw_write_held(&lvp->v_lock.vl_lock);
-       if (lockcnt <= 0)
+       if (! rw_write_held(&lvp->v_lock.vl_lock))
                panic("unionfs: no exclusive lock");

Please use KASSERT, as rw_write_held() returns to diagnostic-only nature.

One more thought - how about making vlockmgr() a static inline?  We might
also have a more convenient LOCKDEBUG tracking of last acquire/release.

Thanks.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index