Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/union Set *vpp to NULL before calling VOP_CREATE. Thi...
details: https://anonhg.NetBSD.org/src/rev/89d99e94c5fc
branches: trunk
changeset: 329255:89d99e94c5fc
user: dholland <dholland%NetBSD.org@localhost>
date: Sat May 17 04:03:49 2014 +0000
description:
Set *vpp to NULL before calling VOP_CREATE. This always happens when
calling using nameidata, and if not something went wrong, so we'd like
to be able to assert about it.
diffstat:
sys/fs/union/union_subr.c | 5 +++--
sys/fs/union/union_vnops.c | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (53 lines):
diff -r 734ebff7d369 -r 89d99e94c5fc sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Fri May 16 19:18:21 2014 +0000
+++ b/sys/fs/union/union_subr.c Sat May 17 04:03:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.63 2014/02/16 09:50:25 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.64 2014/05/17 04:03:49 dholland Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.63 2014/02/16 09:50:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.64 2014/05/17 04:03:49 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -889,6 +889,7 @@
vap->va_type = VREG;
vap->va_mode = cmode;
vref(un->un_dirvp);
+ vp = NULL;
error = VOP_CREATE(un->un_dirvp, &vp, &cn, vap);
if (error)
return error;
diff -r 734ebff7d369 -r 89d99e94c5fc sys/fs/union/union_vnops.c
--- a/sys/fs/union/union_vnops.c Fri May 16 19:18:21 2014 +0000
+++ b/sys/fs/union/union_vnops.c Sat May 17 04:03:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vnops.c,v 1.59 2014/03/24 13:42:40 hannken Exp $ */
+/* $NetBSD: union_vnops.c,v 1.60 2014/05/17 04:03:49 dholland Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.59 2014/03/24 13:42:40 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.60 2014/05/17 04:03:49 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -517,6 +517,8 @@
struct mount *mp;
mp = ap->a_dvp->v_mount;
+
+ vp = NULL;
error = VOP_CREATE(dvp, &vp, cnp, ap->a_vap);
if (error)
return (error);
Home |
Main Index |
Thread Index |
Old Index