- Add a VCANRECYCLE() which performs all the checks required to ensure

that we are free to release a vnode.
This commit is contained in:
Jeff Roberson 2005-01-24 10:34:58 +00:00
parent 791625d853
commit 49bc5dcea6

View File

@ -368,6 +368,12 @@ extern struct vattr va_null; /* predefined null vattr structure */
extern void (*lease_updatetime)(int deltat);
/* Requires interlock. */
#define VCANRECYCLE(vp) \
(!((vp)->v_iflag & (VI_DOOMED|VI_DOINGINACT|VI_XLOCK)) && \
((vp)->v_iflag & VI_FREE) && \
!(vp)->v_holdcnt && !(vp)->v_usecount)
/* Requires interlock. */
#define VSHOULDFREE(vp) \
(!((vp)->v_iflag & (VI_FREE|VI_DOOMED|VI_DOINGINACT)) && \