Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern vfs_insmntque: convert check to assert.



details:   https://anonhg.NetBSD.org/src/rev/89dbe8f0be36
branches:  trunk
changeset: 763753:89dbe8f0be36
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sun Apr 03 01:20:23 2011 +0000

description:
vfs_insmntque: convert check to assert.

diffstat:

 sys/kern/vfs_mount.c |  13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (34 lines):

diff -r 64f3d9f7d145 -r 89dbe8f0be36 sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c      Sun Apr 03 01:19:35 2011 +0000
+++ b/sys/kern/vfs_mount.c      Sun Apr 03 01:20:23 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_mount.c,v 1.3 2011/04/02 06:48:20 rmind Exp $      */
+/*     $NetBSD: vfs_mount.c,v 1.4 2011/04/03 01:20:23 rmind Exp $      */
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.3 2011/04/02 06:48:20 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.4 2011/04/03 01:20:23 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -376,13 +376,8 @@
 {
        struct mount *omp;
 
-#ifdef DIAGNOSTIC
-       if ((mp != NULL) &&
-           (mp->mnt_iflag & IMNT_UNMOUNT) &&
-           vp->v_tag != VT_VFS) {
-               panic("insmntque into dying filesystem");
-       }
-#endif
+       KASSERT(mp == NULL || (mp->mnt_iflag & IMNT_UNMOUNT) == 0 ||
+           vp->v_tag == VT_VFS);
 
        mutex_enter(&mntvnode_lock);
        /*



Home | Main Index | Thread Index | Old Index