summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2017-05-17 19:05:23 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2017-05-17 19:37:27 +0000
commitff2d71102ed99de07f1238cde2b4bbfecea728c6 (patch)
treecf454698489dcad788aceed76fd6150666f228cd
parentc6f540b5e264fc4a78eba0d437b6a3d2c92cfa23 (diff)
downloadillumos-joyent-ff2d71102ed99de07f1238cde2b4bbfecea728c6.tar.gz
OS-6134 vn_reinit balks on zeroed vnodes
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--usr/src/uts/common/fs/vnode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/vnode.c b/usr/src/uts/common/fs/vnode.c
index 8ff9905af3..27fbf3cc9f 100644
--- a/usr/src/uts/common/fs/vnode.c
+++ b/usr/src/uts/common/fs/vnode.c
@@ -2416,6 +2416,15 @@ vn_reinit(vnode_t *vp)
vp->v_locality = NULL;
vp->v_xattrdir = NULL;
+ /*
+ * In a few specific instances, vn_reinit() is used to initialize
+ * locally defined vnode_t instances. Lacking the construction offered
+ * by vn_alloc(), these vnodes require v_path initialization.
+ */
+ if (vp->v_path == NULL) {
+ vp->v_path = vn_vpath_empty;
+ }
+
/* Handles v_femhead, v_path, and the r/w/map counts */
vn_recycle(vp);
}