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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_srv.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv.c
↓ open down ↓ 950 lines elided ↑ open up ↑
 951  951           * If dotdotting, then need to check whether it's above the
 952  952           * root of a filesystem, or above an export point.
 953  953           */
 954  954          if (dotdot) {
 955  955  
 956  956                  /*
 957  957                   * If dotdotting at the root of a filesystem, then
 958  958                   * need to traverse back to the mounted-on filesystem
 959  959                   * and do the dotdot lookup there.
 960  960                   */
 961      -                if (cs->vp->v_flag & VROOT) {
      961 +                if ((cs->vp->v_flag & VROOT) || VN_IS_CURZONEROOT(cs->vp)) {
 962  962  
 963  963                          /*
 964  964                           * If at the system root, then can
 965  965                           * go up no further.
 966  966                           */
 967  967                          if (VN_CMP(dvp, ZONE_ROOTVP()))
 968  968                                  return (puterrno4(ENOENT));
 969  969  
 970  970                          /*
 971  971                           * Traverse back to the mounted-on filesystem
↓ open down ↓ 1726 lines elided ↑ open up ↑
2698 2698           * above the root of a filesystem, or above an
2699 2699           * export point.
2700 2700           */
2701 2701          if (dotdot) {
2702 2702  
2703 2703                  /*
2704 2704                   * If dotdotting at the root of a filesystem, then
2705 2705                   * need to traverse back to the mounted-on filesystem
2706 2706                   * and do the dotdot lookup there.
2707 2707                   */
2708      -                if (cs->vp->v_flag & VROOT) {
     2708 +                if ((cs->vp->v_flag & VROOT) || VN_IS_CURZONEROOT(cs->vp)) {
2709 2709  
2710 2710                          /*
2711 2711                           * If at the system root, then can
2712 2712                           * go up no further.
2713 2713                           */
2714 2714                          if (VN_CMP(cs->vp, ZONE_ROOTVP()))
2715 2715                                  return (puterrno4(ENOENT));
2716 2716  
2717 2717                          /*
2718 2718                           * Traverse back to the mounted-on filesystem
↓ open down ↓ 7368 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX