Source-Changes-HG archive

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

[src/trunk]: src/sys/kern vn_close: add an assertion



details:   https://anonhg.NetBSD.org/src/rev/173efead9ec2
branches:  trunk
changeset: 768438:173efead9ec2
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Aug 16 22:33:38 2011 +0000

description:
vn_close: add an assertion

diffstat:

 sys/kern/vfs_vnops.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 938a61dc8883 -r 173efead9ec2 sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c      Tue Aug 16 19:53:03 2011 +0000
+++ b/sys/kern/vfs_vnops.c      Tue Aug 16 22:33:38 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnops.c,v 1.181 2011/06/12 03:35:57 rmind Exp $    */
+/*     $NetBSD: vfs_vnops.c,v 1.182 2011/08/16 22:33:38 yamt Exp $     */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.181 2011/06/12 03:35:57 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.182 2011/08/16 22:33:38 yamt Exp $");
 
 #include "veriexec.h"
 
@@ -348,6 +348,7 @@
 
        if (flags & FWRITE) {
                mutex_enter(vp->v_interlock);
+               KASSERT(vp->v_writecount > 0);
                vp->v_writecount--;
                mutex_exit(vp->v_interlock);
        }



Home | Main Index | Thread Index | Old Index