Print this page
12505 Answer KEBE question about cred in unexport()


 643         nfs_export_t *ne;
 644 
 645         ne = exip->exi_ne;
 646         ASSERT3P(ne, ==, nfs_get_export());     /* curzone reality check */
 647         ASSERT(RW_WRITE_HELD(&ne->exported_lock));
 648 
 649         gethrestime(&now);
 650 
 651         vp = exip->exi_vp;
 652         VN_HOLD(vp);
 653         exportdir = 1;
 654 
 655         for (;;) {
 656 
 657                 bzero(&fid, sizeof (fid));
 658                 fid.fid_len = MAXFIDSZ;
 659                 error = vop_fid_pseudo(vp, &fid);
 660                 if (error)
 661                         break;
 662 
 663                 /* XXX KEBE ASKS DO WE NEED THIS?!? */
 664                 ASSERT3U(exip->exi_zoneid, ==, curzone->zone_id);
 665                 /*
 666                  * The root of the file system, or the zone's root for
 667                  * in-zone NFS service needs special handling
 668                  */
 669                 if (vp->v_flag & VROOT || vp == EXI_TO_ZONEROOTVP(exip)) {
 670                         if (!exportdir) {
 671                                 struct exportinfo *exi;
 672 
 673                                 /*
 674                                  * Check if this VROOT dir is already exported.
 675                                  * If so, then attach the pseudonodes.  If not,
 676                                  * then continue .. traversal until we hit a
 677                                  * VROOT export (pseudo or real).
 678                                  */
 679                                 exi = checkexport4(&vp->v_vfsp->vfs_fsid, &fid,
 680                                     vp);
 681                                 if (exi != NULL) {
 682                                         /*
 683                                          * Found an export info




 643         nfs_export_t *ne;
 644 
 645         ne = exip->exi_ne;
 646         ASSERT3P(ne, ==, nfs_get_export());     /* curzone reality check */
 647         ASSERT(RW_WRITE_HELD(&ne->exported_lock));
 648 
 649         gethrestime(&now);
 650 
 651         vp = exip->exi_vp;
 652         VN_HOLD(vp);
 653         exportdir = 1;
 654 
 655         for (;;) {
 656 
 657                 bzero(&fid, sizeof (fid));
 658                 fid.fid_len = MAXFIDSZ;
 659                 error = vop_fid_pseudo(vp, &fid);
 660                 if (error)
 661                         break;
 662 

 663                 ASSERT3U(exip->exi_zoneid, ==, curzone->zone_id);
 664                 /*
 665                  * The root of the file system, or the zone's root for
 666                  * in-zone NFS service needs special handling
 667                  */
 668                 if (vp->v_flag & VROOT || vp == EXI_TO_ZONEROOTVP(exip)) {
 669                         if (!exportdir) {
 670                                 struct exportinfo *exi;
 671 
 672                                 /*
 673                                  * Check if this VROOT dir is already exported.
 674                                  * If so, then attach the pseudonodes.  If not,
 675                                  * then continue .. traversal until we hit a
 676                                  * VROOT export (pseudo or real).
 677                                  */
 678                                 exi = checkexport4(&vp->v_vfsp->vfs_fsid, &fid,
 679                                     vp);
 680                                 if (exi != NULL) {
 681                                         /*
 682                                          * Found an export info