summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/zone.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/os/zone.c')
-rw-r--r--usr/src/uts/common/os/zone.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/common/os/zone.c b/usr/src/uts/common/os/zone.c
index e7b929c406..b4abecaadf 100644
--- a/usr/src/uts/common/os/zone.c
+++ b/usr/src/uts/common/os/zone.c
@@ -3090,6 +3090,15 @@ zone_destroy(zoneid_t zoneid)
(mod_hash_key_t)(uintptr_t)zone->zone_id);
mutex_exit(&zonehash_lock);
+ /*
+ * Release the root vnode; we're not using it anymore. Nor should any
+ * other thread that might access it exist.
+ */
+ if (zone->zone_rootvp != NULL) {
+ VN_RELE(zone->zone_rootvp);
+ zone->zone_rootvp = NULL;
+ }
+
/* add to deathrow list */
mutex_enter(&zone_deathrow_lock);
list_insert_tail(&zone_deathrow, zone);