diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-12-05 00:36:18 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-12-05 00:36:18 +0000 |
commit | 6479e9edf8529df7ff39c065a9b5d3f6159d69e7 (patch) | |
tree | 5cda069d742823568e7cbf318666155fedfbb239 | |
parent | 73fdb0951451f261d8917e0e035de770cb7409b6 (diff) |
Make DEBUG not default, and make the default compile
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index d984d9e4275..624a862f3e7 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.28 2001/12/04 15:05:56 art Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.29 2001/12/05 00:36:17 niklas Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. * @@ -41,14 +41,11 @@ */ /* - * For now we want the safety net that the DIAGNOSTIC and DEBUG flags provide. + * For now we want the safety net that the DIAGNOSTIC flag provide. */ #ifndef DIAGNOSTIC #define DIAGNOSTIC #endif -#ifndef DEBUG -#define DEBUG -#endif #include <sys/param.h> #include <sys/buf.h> @@ -370,8 +367,10 @@ sema_release(semap) { if (semap->value <= 0 || semap->holder != CURPROC->p_pid) { +#ifdef DEBUG if (lk.lkt_held != -1) FREE_LOCK(&lk); +#endif panic("sema_release: not held"); } if (--semap->value > 0) { @@ -517,8 +516,10 @@ add_to_worklist(wk) static struct worklist *worklist_tail; if (wk->wk_state & ONWORKLIST) { +#ifdef DEBUG if (lk.lkt_held != -1) FREE_LOCK(&lk); +#endif panic("add_to_worklist: already on list"); } wk->wk_state |= ONWORKLIST; @@ -2939,7 +2940,9 @@ handle_workitem_freefile(freefile) { struct fs *fs; struct inode tip; +#ifdef DEBUG struct inodedep *idp; +#endif int error; fs = VFSTOUFS(freefile->fx_mnt)->um_fs; |