Print this page
Try to remove assumption that zone's root vnode is marked VROOT

@@ -1301,19 +1301,19 @@
         vnode_t *stubvp = NULL, *vp;
 
         vp = sarg->cs->vp;
         sarg->mntdfid_set = FALSE;
 
-        /* VROOT object, must untraverse */
-        if (vp->v_flag & VROOT) {
+        /* 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);
 
                 /*
-                 * If vp/stubvp are same, we must be at system
+                 * If vp/stubvp are same, we must be at system-or-zone
                  * root because untraverse returned same vp
                  * 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.
                  */

@@ -1375,14 +1375,14 @@
                 if (sarg->op == NFS4ATTR_SETIT)
                         error = EINVAL;
                 break;          /* this attr is supported */
         case NFS4ATTR_GETIT:
         case NFS4ATTR_VERIT:
-                if (! sarg->mntdfid_set)
+                if (!sarg->mntdfid_set)
                         error = rfs4_get_mntdfileid(cmd, sarg);
 
-                if (! error && sarg->mntdfid_set) {
+                if (!error && sarg->mntdfid_set) {
                         if (cmd == NFS4ATTR_GETIT)
                                 na->mounted_on_fileid = sarg->mounted_on_fileid;
                         else
                                 if (na->mounted_on_fileid !=
                                     sarg->mounted_on_fileid)