Print this page
Send nfs_export_t to untraverse()

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_srv_ns.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv_ns.c
↓ open down ↓ 713 lines elided ↑ open up ↑
 714  714                                  /* Update the change timestamp */
 715  715                                  tree_update_change(ne, ne->ns_root, &now);
 716  716  
 717  717                                  break;
 718  718                          }
 719  719  
 720  720                          /*
 721  721                           * Traverse across the mountpoint and continue the
 722  722                           * climb on the mounted-on filesystem.
 723  723                           */
 724      -                        vp = untraverse(vp);
      724 +                        vp = untraverse(ne, vp);
 725  725                          exportdir = 0;
 726  726                          continue;
 727  727                  }
 728  728  
 729  729                  /*
 730  730                   * Do a getattr to obtain the nodeid (inode num)
 731  731                   * for this vnode.
 732  732                   */
 733  733                  va.va_mask = AT_NODEID;
 734  734                  error = VOP_GETATTR(vp, &va, 0, CRED(), NULL);
↓ open down ↓ 168 lines elided ↑ open up ↑
 903  903  
 904  904          /* Update the change timestamp */
 905  905          if (connect_point != NULL)
 906  906                  tree_update_change(ne, connect_point, NULL);
 907  907  }
 908  908  
 909  909  /*
 910  910   * Traverse backward across mountpoint from the
 911  911   * root vnode of a filesystem to its mounted-on
 912  912   * vnode.
 913      - *
 914      - * Callers to this function have confirmed the use of curzone is safe here.
 915  913   */
 916  914  vnode_t *
 917      -untraverse(vnode_t *vp)
      915 +untraverse(nfs_export_t *ne, vnode_t *vp)
 918  916  {
 919  917          vnode_t *tvp, *nextvp;
      918 +        vnode_t *zone_rootvp = ne->exi_root->exi_vp;
 920  919  
 921  920          tvp = vp;
 922  921          for (;;) {
 923      -                if (!(tvp->v_flag & VROOT) && !VN_IS_CURZONEROOT(tvp))
      922 +                if (!(tvp->v_flag & VROOT) && !VN_CMP(tvp, zone_rootvp))
 924  923                          break;
 925  924  
 926  925                  /* lock vfs to prevent unmount of this vfs */
 927  926                  vfs_lock_wait(tvp->v_vfsp);
 928  927  
 929  928                  if ((nextvp = tvp->v_vfsp->vfs_vnodecovered) == NULL) {
 930  929                          vfs_unlock(tvp->v_vfsp);
 931  930                          break;
 932  931                  }
 933  932  
↓ open down ↓ 358 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX