Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern assertions
details: https://anonhg.NetBSD.org/src/rev/571de775af94
branches: trunk
changeset: 771744:571de775af94
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Dec 02 12:32:38 2011 +0000
description:
assertions
diffstat:
sys/kern/vfs_subr.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r e96027d98855 -r 571de775af94 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Fri Dec 02 12:31:53 2011 +0000
+++ b/sys/kern/vfs_subr.c Fri Dec 02 12:32:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.425 2011/09/01 09:04:08 christos Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.426 2011/12/02 12:32:38 yamt Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.425 2011/09/01 09:04:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.426 2011/12/02 12:32:38 yamt Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -166,6 +166,7 @@
mutex_enter(&bufcache_lock);
restart:
for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
+ KASSERT(bp->b_vp == vp);
nbp = LIST_NEXT(bp, b_vnbufs);
error = bbusy(bp, catch, slptimeo, NULL);
if (error != 0) {
@@ -178,6 +179,7 @@
}
for (bp = LIST_FIRST(&vp->v_cleanblkhd); bp; bp = nbp) {
+ KASSERT(bp->b_vp == vp);
nbp = LIST_NEXT(bp, b_vnbufs);
error = bbusy(bp, catch, slptimeo, NULL);
if (error != 0) {
@@ -236,6 +238,7 @@
mutex_enter(&bufcache_lock);
restart:
for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
+ KASSERT(bp->b_vp == vp);
nbp = LIST_NEXT(bp, b_vnbufs);
if (bp->b_lblkno < lbn)
continue;
@@ -250,6 +253,7 @@
}
for (bp = LIST_FIRST(&vp->v_cleanblkhd); bp; bp = nbp) {
+ KASSERT(bp->b_vp == vp);
nbp = LIST_NEXT(bp, b_vnbufs);
if (bp->b_lblkno < lbn)
continue;
@@ -285,6 +289,7 @@
loop:
mutex_enter(&bufcache_lock);
for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
+ KASSERT(bp->b_vp == vp);
nbp = LIST_NEXT(bp, b_vnbufs);
if ((bp->b_cflags & BC_BUSY))
continue;
Home |
Main Index |
Thread Index |
Old Index