Module Name: src
Committed By: leot
Date: Thu Oct 29 16:19:44 UTC 2015
Modified Files:
src/sys/fs/tmpfs: tmpfs_subr.c
Log Message:
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.
Fixes PR kern/50381.
To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/fs/tmpfs/tmpfs_subr.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/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.100 src/sys/fs/tmpfs/tmpfs_subr.c:1.101
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.100 Tue Jul 7 09:30:24 2015
+++ src/sys/fs/tmpfs/tmpfs_subr.c Thu Oct 29 16:19:44 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_subr.c,v 1.100 2015/07/07 09:30:24 justin Exp $ */
+/* $NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $ */
/*
* Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.100 2015/07/07 09:30:24 justin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $");
#include <sys/param.h>
#include <sys/cprng.h>
@@ -459,6 +459,7 @@ tmpfs_alloc_dirent(tmpfs_mount_t *tmp, c
nde->td_namelen = len;
memcpy(nde->td_name, name, len);
nde->td_seq = TMPFS_DIRSEQ_NONE;
+ nde->td_node = NULL; /* for asserts */
*de = nde;
return 0;