Print this page
Send nfs_export_t to untraverse()


1303 {
1304         int error = 0;
1305         vattr_t *vap, va;
1306         vnode_t *stubvp = NULL, *vp;
1307 
1308         vp = sarg->cs->vp;
1309         sarg->mntdfid_set = FALSE;
1310 
1311         /*
1312          * VROOT object or zone's root, must untraverse.
1313          *
1314          * NOTE: Not doing reality checks on curzone vs. compound
1315          * state vnode because it will mismatch once at initialization
1316          * if a non-global-zone triggers the module load, BUT in that case
1317          * the vp is literally "/" which has VROOT set.
1318          */
1319         if ((vp->v_flag & VROOT) || VN_IS_CURZONEROOT(vp)) {
1320 
1321                 /* extra hold for vp since untraverse might rele */
1322                 VN_HOLD(vp);
1323                 stubvp = untraverse(vp);
1324 
1325                 /*
1326                  * If vp/stubvp are same, we must be at system-or-zone
1327                  * root because untraverse returned same vp
1328                  * for a VROOT object.  sarg->vap was setup
1329                  * before we got here, so there's no need to do
1330                  * another getattr -- just use the one in sarg.
1331                  */
1332                 if (VN_CMP(vp, stubvp)) {
1333                         ASSERT(VN_IS_CURZONEROOT(vp));
1334                         vap = sarg->vap;
1335                 } else {
1336                         va.va_mask = AT_NODEID;
1337                         vap = &va;
1338                         error = rfs4_vop_getattr(stubvp, vap, 0, sarg->cs->cr);
1339                 }
1340 
1341                 /*
1342                  * Done with stub, time to rele.  If vp and stubvp
1343                  * were the same, then we need to rele either vp or




1303 {
1304         int error = 0;
1305         vattr_t *vap, va;
1306         vnode_t *stubvp = NULL, *vp;
1307 
1308         vp = sarg->cs->vp;
1309         sarg->mntdfid_set = FALSE;
1310 
1311         /*
1312          * VROOT object or zone's root, must untraverse.
1313          *
1314          * NOTE: Not doing reality checks on curzone vs. compound
1315          * state vnode because it will mismatch once at initialization
1316          * if a non-global-zone triggers the module load, BUT in that case
1317          * the vp is literally "/" which has VROOT set.
1318          */
1319         if ((vp->v_flag & VROOT) || VN_IS_CURZONEROOT(vp)) {
1320 
1321                 /* extra hold for vp since untraverse might rele */
1322                 VN_HOLD(vp);
1323                 stubvp = untraverse(nfs_get_export(), vp);
1324 
1325                 /*
1326                  * If vp/stubvp are same, we must be at system-or-zone
1327                  * root because untraverse returned same vp
1328                  * for a VROOT object.  sarg->vap was setup
1329                  * before we got here, so there's no need to do
1330                  * another getattr -- just use the one in sarg.
1331                  */
1332                 if (VN_CMP(vp, stubvp)) {
1333                         ASSERT(VN_IS_CURZONEROOT(vp));
1334                         vap = sarg->vap;
1335                 } else {
1336                         va.va_mask = AT_NODEID;
1337                         vap = &va;
1338                         error = rfs4_vop_getattr(stubvp, vap, 0, sarg->cs->cr);
1339                 }
1340 
1341                 /*
1342                  * Done with stub, time to rele.  If vp and stubvp
1343                  * were the same, then we need to rele either vp or