Print this page
Fix NFS design problems re. multiple zone keys
Make NFS server zone-specific data all have the same lifetime
Fix rfs4_clean_state_exi
Fix exi_cache_reclaim
Fix mistakes in zone keys work
More fixes re. exi_zoneid and exi_tree
(danmcd -> Keep some ASSERT()s around for readability.)

@@ -167,10 +167,11 @@
         exi->exi_count = 1;
         /* Caller will set exi_zone... */
         exi->exi_volatile_dev = (vfssw[vp->v_vfsp->vfs_fstype].vsw_flag &
             VSW_VOLATILEDEV) ? 1 : 0;
         mutex_init(&exi->exi_lock, NULL, MUTEX_DEFAULT, NULL);
+        exi->exi_zoneid = ne->ne_globals->nfs_zoneid;
 
         /*
          * Build up the template fhandle
          */
         exi->exi_fh.fh_fsid = fsid;

@@ -838,11 +839,22 @@
         treenode_t *connect_point = NULL;
 
         ASSERT(RW_WRITE_HELD(&ne->exported_lock));
         ASSERT(curzone == exip->exi_zone || curzone == global_zone);
 
+        /*
+         * exi_tree can be null for the zone root
+         * which means we're already at the "top"
+         * and there's nothing more to "climb".
+         */
         tnode = exip->exi_tree;
+        if (tnode == NULL) {
+                /* Should only happen for... */
+                ASSERT(exip == ne->exi_root);
+                return;
+        }
+
         /*
          * The unshared exportinfo was unlinked in unexport().
          * Zeroing tree_exi ensures that we will skip it.
          */
         tnode->tree_exi = NULL;