Add VNASSERT() which is just like KASSERT() but takes a vnode argument

which it will vn_printf() if it triggers.
This commit is contained in:
Poul-Henning Kamp 2005-02-07 12:56:19 +00:00
parent 88d91a5ad0
commit 9ca72ab21e

View File

@ -74,8 +74,15 @@ extern int maxusers; /* system tune hint */
if (__predict_false(!(exp))) \
panic msg; \
} while (0)
#define VNASSERT(exp, vp, msg) do { \
if (__predict_false(!(exp))) { \
vn_printf(vp, "VNASSERT failed\n"); \
panic msg; \
} \
} while (0)
#else
#define KASSERT(exp,msg)
#define VNASSERT(exp, vp, msg)
#endif
#ifndef CTASSERT /* Allow lint to override */