Module Name: src
Committed By: dholland
Date: Sat May 17 04:03:49 UTC 2014
Modified Files:
src/sys/fs/union: union_subr.c union_vnops.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/fs/union/union_subr.c
cvs rdiff -u -r1.59 -r1.60 src/sys/fs/union/union_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.63 src/sys/fs/union/union_subr.c:1.64
--- src/sys/fs/union/union_subr.c:1.63 Sun Feb 16 09:50:25 2014
+++ src/sys/fs/union/union_subr.c Sat May 17 04:03:49 2014
@@ -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 @@ union_vn_create(struct vnode **vpp, stru
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;
Index: src/sys/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.59 src/sys/fs/union/union_vnops.c:1.60
--- src/sys/fs/union/union_vnops.c:1.59 Mon Mar 24 13:42:40 2014
+++ src/sys/fs/union/union_vnops.c Sat May 17 04:03:49 2014
@@ -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 @@ union_create(void *v)
struct mount *mp;
mp = ap->a_dvp->v_mount;
+
+ vp = NULL;
error = VOP_CREATE(dvp, &vp, cnp, ap->a_vap);
if (error)
return (error);