Print this page
curzone reality check and teardown changes to use the RIGHT zone

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_state.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_state.c
↓ open down ↓ 4099 lines elided ↑ open up ↑
4100 4100   * Given a directory that is being unexported, cleanup/release all
4101 4101   * state in the server that refers to objects residing underneath this
4102 4102   * particular export.  The ordering of the release is important.
4103 4103   * Lock_owner, then state and then file.
4104 4104   */
4105 4105  void
4106 4106  rfs4_clean_state_exi(struct exportinfo *exi)
4107 4107  {
4108 4108          nfs4_srv_t *nsrv4;
4109 4109  
4110      -        nsrv4 = zone_getspecific(rfs4_zone_key, curzone);
     4110 +        /* curzone mightn't be exi_zone, so use exi_zone instead. */
     4111 +        ASSERT(exi->exi_zone == curzone || curzone == global_zone);
     4112 +        nsrv4 = zone_getspecific(rfs4_zone_key, exi->exi_zone);
4111 4113          mutex_enter(&nsrv4->state_lock);
4112 4114  
4113 4115          if (nsrv4->nfs4_server_state == NULL) {
4114 4116                  mutex_exit(&nsrv4->state_lock);
4115 4117                  return;
4116 4118          }
4117 4119  
4118 4120          /* CSTYLED */
4119 4121          rfs4_dbe_walk(nsrv4->rfs4_lo_state_tab, rfs4_lo_state_walk_callout, exi);
4120 4122          rfs4_dbe_walk(nsrv4->rfs4_state_tab, rfs4_state_walk_callout, exi);
4121 4123          /* CSTYLED */
4122 4124          rfs4_dbe_walk(nsrv4->rfs4_deleg_state_tab, rfs4_deleg_state_walk_callout, exi);
4123 4125          rfs4_dbe_walk(nsrv4->rfs4_file_tab, rfs4_file_walk_callout, exi);
4124 4126  
4125 4127          mutex_exit(&nsrv4->state_lock);
4126 4128  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX