Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/union Also set or assert that *vpp is null before cal...
details: https://anonhg.NetBSD.org/src/rev/3145d9780d93
branches: trunk
changeset: 329256:3145d9780d93
user: dholland <dholland%NetBSD.org@localhost>
date: Sat May 17 04:07:15 2014 +0000
description:
Also set or assert that *vpp is null before calling VOP_MKDIR.
diffstat:
sys/fs/union/union_subr.c | 5 +++--
sys/fs/union/union_vnops.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r 89d99e94c5fc -r 3145d9780d93 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Sat May 17 04:03:49 2014 +0000
+++ b/sys/fs/union/union_subr.c Sat May 17 04:07:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.64 2014/05/17 04:03:49 dholland Exp $ */
+/* $NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.64 2014/05/17 04:03:49 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -811,6 +811,7 @@
va.va_type = VDIR;
va.va_mode = um->um_cmode;
+ KASSERT(*vpp == NULL);
error = VOP_MKDIR(dvp, vpp, &cn, &va);
VOP_UNLOCK(dvp);
PNBUF_PUT(pnbuf);
diff -r 89d99e94c5fc -r 3145d9780d93 sys/fs/union/union_vnops.c
--- a/sys/fs/union/union_vnops.c Sat May 17 04:03:49 2014 +0000
+++ b/sys/fs/union/union_vnops.c Sat May 17 04:07:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vnops.c,v 1.60 2014/05/17 04:03:49 dholland Exp $ */
+/* $NetBSD: union_vnops.c,v 1.61 2014/05/17 04:07:15 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.60 2014/05/17 04:03:49 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.61 2014/05/17 04:07:15 dholland Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1385,6 +1385,7 @@
int error;
struct vnode *vp;
+ vp = NULL;
error = VOP_MKDIR(dvp, &vp, cnp, ap->a_vap);
if (error) {
vrele(ap->a_dvp);
Home |
Main Index |
Thread Index |
Old Index