Add another KASSERT.

This commit is contained in:
christos 2005-09-12 20:26:44 +00:00
parent c93a283e5f
commit 49840169c0
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_inode.c,v 1.74 2005/09/12 20:09:59 drochner Exp $ */ /* $NetBSD: ffs_inode.c,v 1.75 2005/09/12 20:26:44 christos Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1989, 1993 * Copyright (c) 1982, 1986, 1989, 1993
@ -32,7 +32,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.74 2005/09/12 20:09:59 drochner Exp $"); __KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.75 2005/09/12 20:26:44 christos Exp $");
#if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT)
#include "opt_ffs.h" #include "opt_ffs.h"
@ -654,6 +654,9 @@ ffs_itimes(struct inode *ip, const struct timespec *acc,
const struct timespec *mod, const struct timespec *cre) const struct timespec *mod, const struct timespec *cre)
{ {
struct timespec *ts = NULL, tsb; struct timespec *ts = NULL, tsb;
KASSERT(ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY));
if (ip->i_flag & IN_ACCESS) { if (ip->i_flag & IN_ACCESS) {
if (acc == NULL) if (acc == NULL)
acc = ts == NULL ? (ts = nanotime(&tsb)) : ts; acc = ts == NULL ? (ts = nanotime(&tsb)) : ts;