Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/puffs Add a few KASSERT() - I have a crash that likel...
details: https://anonhg.NetBSD.org/src/rev/16e8b412f64d
branches: trunk
changeset: 772810:16e8b412f64d
user: martin <martin%NetBSD.org@localhost>
date: Tue Jan 17 09:30:16 2012 +0000
description:
Add a few KASSERT() - I have a crash that likely will cause one of them to
fire...
diffstat:
sys/fs/puffs/puffs_vnops.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r a443ca4d975d -r 16e8b412f64d sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Tue Jan 17 08:23:40 2012 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Tue Jan 17 09:30:16 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.162 2011/11/18 21:18:50 christos Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.163 2012/01/17 09:30:16 martin Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.162 2011/11/18 21:18:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.163 2012/01/17 09:30:16 martin Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -1356,11 +1356,16 @@
off_t a_offhi;
} */ *ap = v;
PUFFS_MSG_VARS(vn, fsync);
- struct vnode *vp = ap->a_vp;
- struct puffs_node *pn = VPTOPP(vp);
- struct puffs_mount *pmp = MPTOPUFFSMP(vp->v_mount);
+ struct vnode *vp;
+ struct puffs_node *pn;
+ struct puffs_mount *pmp;
int error, dofaf;
+ vp = ap->a_vp;
+ KASSERT(vp != NULL);
+ pn = VPTOPP(vp);
+ KASSERT(pn != NULL);
+ pmp = MPTOPUFFSMP(vp->v_mount);
if (ap->a_flags & FSYNC_WAIT) {
mutex_enter(&pn->pn_sizemtx);
} else {
Home |
Main Index |
Thread Index |
Old Index