#undef assert()
#endif
#define assert(cond) \
- if (!(cond)) panic("%s:%d (%s)", __FILE__, __LINE__, # cond)
+ ((void) ((cond) ? 0 : panic("%s:%d (%s)", __FILE__, __LINE__, # cond)))
#else
#include <kern/assert.h>
#endif /* DIAGNOSTIC */
/*
* Get the size of the file
- * For local file systems the size is locally cached. For NFS
- * there might be a network transaction for this.
*/
off_t
ubc_getsize(struct vnode *vp)
{
- /* XXX deal with NFS */
return (vp->v_ubcinfo->ui_size);
}
if (!UBCINFOEXISTS(vp))
return (0);
+ if (tookref == 0) {
+ printf("ubc_isinuse: called without a valid reference"
+ ": v_tag = %d\v", vp->v_tag);
+ vprint("ubc_isinuse", vp);
+ return (0);
+ }
+
if (vp->v_usecount > busycount)
return (1);