diff options
author | jeff <jeff@FreeBSD.org> | 2005-01-24 10:34:58 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-01-24 10:34:58 +0000 |
commit | c4b1649eba5ac789bffb29c1d165cf44811ad8b8 (patch) | |
tree | b2eb05fb0cb2f148bb4589db7f3f8fbabc22133f | |
parent | e5940f4bef093ba765110a2d40d0bfc1281dedb5 (diff) | |
download | FreeBSD-src-c4b1649eba5ac789bffb29c1d165cf44811ad8b8.zip FreeBSD-src-c4b1649eba5ac789bffb29c1d165cf44811ad8b8.tar.gz |
- Add a VCANRECYCLE() which performs all the checks required to ensure
that we are free to release a vnode.
-rw-r--r-- | sys/sys/vnode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 0c17253..dc9f67c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -369,6 +369,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)) && \ !(vp)->v_holdcnt && !(vp)->v_usecount && \ |