Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ext2fs Add a KASSERT like the one ffs has.



details:   https://anonhg.NetBSD.org/src/rev/1e0b879adaef
branches:  trunk
changeset: 584302:1e0b879adaef
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 12 20:21:18 2005 +0000

description:
Add a KASSERT like the one ffs has.

diffstat:

 sys/ufs/ext2fs/ext2fs_subr.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6dcaa9a9a655 -r 1e0b879adaef sys/ufs/ext2fs/ext2fs_subr.c
--- a/sys/ufs/ext2fs/ext2fs_subr.c      Mon Sep 12 20:09:59 2005 +0000
+++ b/sys/ufs/ext2fs/ext2fs_subr.c      Mon Sep 12 20:21:18 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext2fs_subr.c,v 1.15 2005/09/12 16:24:41 christos Exp $        */
+/*     $NetBSD: ext2fs_subr.c,v 1.16 2005/09/12 20:21:18 christos Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_subr.c,v 1.15 2005/09/12 16:24:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_subr.c,v 1.16 2005/09/12 20:21:18 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -117,6 +117,8 @@
 {
        struct timespec *ts = NULL, tsb;
 
+       KASSERT(ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY));
+
        if (ip->i_flag & IN_ACCESS) {
                if (acc == NULL)
                        acc = ts == NULL ? (ts = nanotime(&tsb)) : ts;



Home | Main Index | Thread Index | Old Index