Print this page
Send zone's rootvp to untraverse()

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 ↓ 965 lines elided ↑ open up ↑
 966  966          dvp = cs->vp;
 967  967          exi = cs->exi;
 968  968          ASSERT(exi != NULL);
 969  969          dotdot = (nm[0] == '.' && nm[1] == '.' && nm[2] == '\0');
 970  970  
 971  971          /*
 972  972           * If dotdotting, then need to check whether it's above the
 973  973           * root of a filesystem, or above an export point.
 974  974           */
 975  975          if (dotdot) {
 976      -                ASSERT3U(exi->exi_zoneid, ==, curzone->zone_id);
      976 +                vnode_t *zone_rootvp = ne->exi_root->exi_vp;
      977 +
      978 +                ASSERT3U(exi->exi_zoneid, ==, ne->exi_root->exi_zoneid);
 977  979                  /*
 978  980                   * If dotdotting at the root of a filesystem, then
 979  981                   * need to traverse back to the mounted-on filesystem
 980  982                   * and do the dotdot lookup there.
 981  983                   */
 982      -                if ((dvp->v_flag & VROOT) || VN_IS_CURZONEROOT(dvp)) {
      984 +                if ((dvp->v_flag & VROOT) || VN_CMP(dvp, zone_rootvp)) {
 983  985  
 984  986                          /*
 985  987                           * If at the system root, then can
 986  988                           * go up no further.
 987  989                           */
 988      -                        if (VN_CMP(dvp, ZONE_ROOTVP()))
      990 +                        if (VN_CMP(dvp, zone_rootvp))
 989  991                                  return (puterrno4(ENOENT));
 990  992  
 991  993                          /*
 992  994                           * Traverse back to the mounted-on filesystem
 993  995                           */
 994      -                        dvp = untraverse(dvp);
      996 +                        dvp = untraverse(dvp, zone_rootvp);
 995  997  
 996  998                          /*
 997  999                           * Set the different_export flag so we remember
 998 1000                           * to pick up a new exportinfo entry for
 999 1001                           * this new filesystem.
1000 1002                           */
1001 1003                          different_export = 1;
1002 1004                  } else {
1003 1005  
1004 1006                          /*
↓ open down ↓ 1707 lines elided ↑ open up ↑
2712 2714          }
2713 2715  
2714 2716          dotdot = (nm[0] == '.' && nm[1] == '.' && nm[2] == '\0');
2715 2717  
2716 2718          /*
2717 2719           * If dotdotting, then need to check whether it's
2718 2720           * above the root of a filesystem, or above an
2719 2721           * export point.
2720 2722           */
2721 2723          if (dotdot) {
     2724 +                vnode_t *zone_rootvp;
     2725 +
2722 2726                  ASSERT(cs->exi != NULL);
2723      -                ASSERT3U(cs->exi->exi_zoneid, ==, curzone->zone_id);
     2727 +                zone_rootvp = cs->exi->exi_ne->exi_root->exi_vp;
2724 2728                  /*
2725 2729                   * If dotdotting at the root of a filesystem, then
2726 2730                   * need to traverse back to the mounted-on filesystem
2727 2731                   * and do the dotdot lookup there.
2728 2732                   */
2729      -                if ((cs->vp->v_flag & VROOT) || VN_IS_CURZONEROOT(cs->vp)) {
     2733 +                if ((cs->vp->v_flag & VROOT) || VN_CMP(cs->vp, zone_rootvp)) {
2730 2734  
2731 2735                          /*
2732 2736                           * If at the system root, then can
2733 2737                           * go up no further.
2734 2738                           */
2735      -                        if (VN_CMP(cs->vp, ZONE_ROOTVP()))
     2739 +                        if (VN_CMP(cs->vp, zone_rootvp))
2736 2740                                  return (puterrno4(ENOENT));
2737 2741  
2738 2742                          /*
2739 2743                           * Traverse back to the mounted-on filesystem
2740 2744                           */
2741      -                        cs->vp = untraverse(cs->vp);
     2745 +                        cs->vp = untraverse(cs->vp, zone_rootvp);
2742 2746  
2743 2747                          /*
2744 2748                           * Set the different_export flag so we remember
2745 2749                           * to pick up a new exportinfo entry for
2746 2750                           * this new filesystem.
2747 2751                           */
2748 2752                          different_export = 1;
2749 2753                  } else {
2750 2754  
2751 2755                          /*
↓ open down ↓ 7356 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX