Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs_acl_srv.c
          +++ new/usr/src/uts/common/fs/nfs/nfs_acl_srv.c
↓ open down ↓ 451 lines elided ↑ open up ↑
 452  452          vattr_t va;
 453  453  
 454  454          vap = NULL;
 455  455  
 456  456          vp = nfs3_fhtovp(&args->fh, exi);
 457  457          if (vp == NULL) {
 458  458                  error = ESTALE;
 459  459                  goto out;
 460  460          }
 461  461  
 462      -#ifdef DEBUG
 463      -        if (rfs3_do_post_op_attr) {
 464      -                va.va_mask = AT_ALL;
 465      -                vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 466      -        } else
 467      -                vap = NULL;
 468      -#else
 469  462          va.va_mask = AT_ALL;
 470  463          vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 471      -#endif
 472  464  
 473  465          bzero((caddr_t)&resp->resok.acl, sizeof (resp->resok.acl));
 474  466  
 475  467          resp->resok.acl.vsa_mask = args->mask;
 476  468  
 477  469          error = VOP_GETSECATTR(vp, &resp->resok.acl, 0, cr, NULL);
 478  470  
 479  471          if ((error == ENOSYS) && !(exi->exi_export.ex_flags & EX_NOACLFAB)) {
 480  472                  /*
 481  473                   * If the underlying file system doesn't support
↓ open down ↓ 9 lines elided ↑ open up ↑
 491  483                   *
 492  484                   * Note: if the fs_fab_acl() fails, we have other problems.
 493  485                   * This error should be returned to the caller.
 494  486                   */
 495  487                  error = fs_fab_acl(vp, &resp->resok.acl, 0, cr, NULL);
 496  488          }
 497  489  
 498  490          if (error)
 499  491                  goto out;
 500  492  
 501      -#ifdef DEBUG
 502      -        if (rfs3_do_post_op_attr) {
 503      -                va.va_mask = AT_ALL;
 504      -                vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 505      -        } else
 506      -                vap = NULL;
 507      -#else
 508  493          va.va_mask = AT_ALL;
 509  494          vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 510      -#endif
 511  495  
 512  496          VN_RELE(vp);
 513  497  
 514  498          resp->status = NFS3_OK;
 515  499          vattr_to_post_op_attr(vap, &resp->resok.attr);
 516  500          if (!(args->mask & NA_ACL)) {
 517  501                  if (resp->resok.acl.vsa_aclcnt > 0 &&
 518  502                      resp->resok.acl.vsa_aclentp != NULL) {
 519  503                          kmem_free((caddr_t)resp->resok.acl.vsa_aclentp,
 520  504                              resp->resok.acl.vsa_aclcnt * sizeof (aclent_t));
↓ open down ↓ 60 lines elided ↑ open up ↑
 581  565          vap = NULL;
 582  566  
 583  567          vp = nfs3_fhtovp(&args->fh, exi);
 584  568          if (vp == NULL) {
 585  569                  error = ESTALE;
 586  570                  goto out1;
 587  571          }
 588  572  
 589  573          (void) VOP_RWLOCK(vp, V_WRITELOCK_TRUE, NULL);
 590  574  
 591      -#ifdef DEBUG
 592      -        if (rfs3_do_post_op_attr) {
 593      -                va.va_mask = AT_ALL;
 594      -                vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 595      -        } else
 596      -                vap = NULL;
 597      -#else
 598  575          va.va_mask = AT_ALL;
 599  576          vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 600      -#endif
 601  577  
 602  578          if (rdonly(exi, req) || vn_is_readonly(vp)) {
 603  579                  resp->status = NFS3ERR_ROFS;
 604  580                  goto out1;
 605  581          }
 606  582  
 607  583          error = VOP_SETSECATTR(vp, &args->acl, 0, cr, NULL);
 608  584  
 609      -#ifdef DEBUG
 610      -        if (rfs3_do_post_op_attr) {
 611      -                va.va_mask = AT_ALL;
 612      -                vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 613      -        } else
 614      -                vap = NULL;
 615      -#else
 616  585          va.va_mask = AT_ALL;
 617  586          vap = rfs4_delegated_getattr(vp, &va, 0, cr) ? NULL : &va;
 618      -#endif
 619  587  
 620  588          if (error)
 621  589                  goto out;
 622  590  
 623  591          VOP_RWUNLOCK(vp, V_WRITELOCK_TRUE, NULL);
 624  592          VN_RELE(vp);
 625  593  
 626  594          resp->status = NFS3_OK;
 627  595          vattr_to_post_op_attr(vap, &resp->resok.attr);
 628  596          return;
↓ open down ↓ 86 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX