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


4090                         (void) vsd_set(vp, nfs4_srv_vkey, NULL);
4091                         mutex_exit(&vp->v_vsd_lock);
4092                         VN_RELE(vp);
4093                         fp->rf_vp = NULL;
4094                 }
4095                 rfs4_dbe_invalidate(fp->rf_dbe);
4096         }
4097 }
4098 
4099 /*
4100  * Given a directory that is being unexported, cleanup/release all
4101  * state in the server that refers to objects residing underneath this
4102  * particular export.  The ordering of the release is important.
4103  * Lock_owner, then state and then file.
4104  */
4105 void
4106 rfs4_clean_state_exi(struct exportinfo *exi)
4107 {
4108         nfs4_srv_t *nsrv4;
4109 
4110         nsrv4 = zone_getspecific(rfs4_zone_key, curzone);


4111         mutex_enter(&nsrv4->state_lock);
4112 
4113         if (nsrv4->nfs4_server_state == NULL) {
4114                 mutex_exit(&nsrv4->state_lock);
4115                 return;
4116         }
4117 
4118         /* CSTYLED */
4119         rfs4_dbe_walk(nsrv4->rfs4_lo_state_tab, rfs4_lo_state_walk_callout, exi);
4120         rfs4_dbe_walk(nsrv4->rfs4_state_tab, rfs4_state_walk_callout, exi);
4121         /* CSTYLED */
4122         rfs4_dbe_walk(nsrv4->rfs4_deleg_state_tab, rfs4_deleg_state_walk_callout, exi);
4123         rfs4_dbe_walk(nsrv4->rfs4_file_tab, rfs4_file_walk_callout, exi);
4124 
4125         mutex_exit(&nsrv4->state_lock);
4126 }


4090                         (void) vsd_set(vp, nfs4_srv_vkey, NULL);
4091                         mutex_exit(&vp->v_vsd_lock);
4092                         VN_RELE(vp);
4093                         fp->rf_vp = NULL;
4094                 }
4095                 rfs4_dbe_invalidate(fp->rf_dbe);
4096         }
4097 }
4098 
4099 /*
4100  * Given a directory that is being unexported, cleanup/release all
4101  * state in the server that refers to objects residing underneath this
4102  * particular export.  The ordering of the release is important.
4103  * Lock_owner, then state and then file.
4104  */
4105 void
4106 rfs4_clean_state_exi(struct exportinfo *exi)
4107 {
4108         nfs4_srv_t *nsrv4;
4109 
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);
4113         mutex_enter(&nsrv4->state_lock);
4114 
4115         if (nsrv4->nfs4_server_state == NULL) {
4116                 mutex_exit(&nsrv4->state_lock);
4117                 return;
4118         }
4119 
4120         /* CSTYLED */
4121         rfs4_dbe_walk(nsrv4->rfs4_lo_state_tab, rfs4_lo_state_walk_callout, exi);
4122         rfs4_dbe_walk(nsrv4->rfs4_state_tab, rfs4_state_walk_callout, exi);
4123         /* CSTYLED */
4124         rfs4_dbe_walk(nsrv4->rfs4_deleg_state_tab, rfs4_deleg_state_walk_callout, exi);
4125         rfs4_dbe_walk(nsrv4->rfs4_file_tab, rfs4_file_walk_callout, exi);
4126 
4127         mutex_exit(&nsrv4->state_lock);
4128 }