Print this page
Be far more judicious in the use of curzone-using macros.
*** 133,143 ****
struct nfs4_svgetit_arg sarg;
struct compound_state cs;
struct statvfs64 sb;
rfs4_init_compound_state(&cs);
! cs.vp = ZONE_ROOTVP();
cs.fh.nfs_fh4_val = NULL;
cs.cr = kcred;
/*
* Get all the supported attributes
--- 133,148 ----
struct nfs4_svgetit_arg sarg;
struct compound_state cs;
struct statvfs64 sb;
rfs4_init_compound_state(&cs);
! /*
! * This is global state checking, called once. We might be in
! * non-global-zone context here (say a modload happens from a zone
! * process) so in this case, we want the global-zone root vnode.
! */
! cs.vp = rootvp;
cs.fh.nfs_fh4_val = NULL;
cs.cr = kcred;
/*
* Get all the supported attributes
*** 1301,1311 ****
vnode_t *stubvp = NULL, *vp;
vp = sarg->cs->vp;
sarg->mntdfid_set = FALSE;
! /* VROOT object or zone's root, must untraverse */
if ((vp->v_flag & VROOT) || VN_IS_CURZONEROOT(vp)) {
/* extra hold for vp since untraverse might rele */
VN_HOLD(vp);
stubvp = untraverse(vp);
--- 1306,1323 ----
vnode_t *stubvp = NULL, *vp;
vp = sarg->cs->vp;
sarg->mntdfid_set = FALSE;
! /*
! * VROOT object or zone's root, must untraverse.
! *
! * NOTE: Not doing reality checks on curzone vs. compound
! * state vnode because it will mismatch once at initialization
! * if a non-global-zone triggers the module load, BUT in that case
! * the vp is literally "/" which has VROOT set.
! */
if ((vp->v_flag & VROOT) || VN_IS_CURZONEROOT(vp)) {
/* extra hold for vp since untraverse might rele */
VN_HOLD(vp);
stubvp = untraverse(vp);
*** 1316,1326 ****
* for a VROOT object. sarg->vap was setup
* before we got here, so there's no need to do
* another getattr -- just use the one in sarg.
*/
if (VN_CMP(vp, stubvp)) {
! ASSERT(VN_CMP(vp, ZONE_ROOTVP()));
vap = sarg->vap;
} else {
va.va_mask = AT_NODEID;
vap = &va;
error = rfs4_vop_getattr(stubvp, vap, 0, sarg->cs->cr);
--- 1328,1338 ----
* for a VROOT object. sarg->vap was setup
* before we got here, so there's no need to do
* another getattr -- just use the one in sarg.
*/
if (VN_CMP(vp, stubvp)) {
! ASSERT(VN_IS_CURZONEROOT(vp));
vap = sarg->vap;
} else {
va.va_mask = AT_NODEID;
vap = &va;
error = rfs4_vop_getattr(stubvp, vap, 0, sarg->cs->cr);