diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:39 -0400 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:39 -0400 | 
| commit | 253ba4e79edc695b2925bd2ef34de06ff4d4070c (patch) | |
| tree | 259667140ca702d6a218cc54f4df275fbbda747b /fs/xfs/xfs_acl.c | |
| parent | 188da98800893691e47eea9335a234378e32aceb (diff) | |
| parent | 65e67f5165c8a156b34ee7adf65d5ed3b16a910d (diff) | |
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: (87 commits)
  [XFS] Fix merge failure
  [XFS] The forward declarations for the xfs_ioctl() helpers and the
  [XFS] Update XFS documentation for noikeep/ikeep.
  [XFS] Update XFS Documentation for ikeep and ihashsize
  [XFS] Remove unused HAVE_SPLICE macro.
  [XFS] Remove CONFIG_XFS_SECURITY.
  [XFS] xfs_bmap_compute_maxlevels should be based on di_forkoff
  [XFS] Always use di_forkoff when checking for attr space.
  [XFS] Ensure the inode is joined in xfs_itruncate_finish
  [XFS] Remove periodic logging of in-core superblock counters.
  [XFS] fix logic error in xfs_alloc_ag_vextent_near()
  [XFS] Don't error out on good I/Os.
  [XFS] Catch log unmount failures.
  [XFS] Sanitise xfs_log_force error checking.
  [XFS] Check for errors when changing buffer pointers.
  [XFS] Don't allow silent errors in xfs_inactive().
  [XFS] Catch errors from xfs_imap().
  [XFS] xfs_bulkstat_one_dinode() never returns an error.
  [XFS] xfs_iflush_fork() never returns an error.
  [XFS] Catch unwritten extent conversion errors.
  ...
Diffstat (limited to 'fs/xfs/xfs_acl.c')
| -rw-r--r-- | fs/xfs/xfs_acl.c | 16 | 
1 files changed, 10 insertions, 6 deletions
| diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 7272fe39a92d..8e130b9720ae 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c | |||
| @@ -307,12 +307,13 @@ xfs_acl_vset( | |||
| 307 | 307 | ||
| 308 | VN_HOLD(vp); | 308 | VN_HOLD(vp); | 
| 309 | error = xfs_acl_allow_set(vp, kind); | 309 | error = xfs_acl_allow_set(vp, kind); | 
| 310 | if (error) | ||
| 311 | goto out; | ||
| 312 | 310 | ||
| 313 | /* Incoming ACL exists, set file mode based on its value */ | 311 | /* Incoming ACL exists, set file mode based on its value */ | 
| 314 | if (kind == _ACL_TYPE_ACCESS) | 312 | if (!error && kind == _ACL_TYPE_ACCESS) | 
| 315 | xfs_acl_setmode(vp, xfs_acl, &basicperms); | 313 | error = xfs_acl_setmode(vp, xfs_acl, &basicperms); | 
| 314 | |||
| 315 | if (error) | ||
| 316 | goto out; | ||
| 316 | 317 | ||
| 317 | /* | 318 | /* | 
| 318 | * If we have more than std unix permissions, set up the actual attr. | 319 | * If we have more than std unix permissions, set up the actual attr. | 
| @@ -323,7 +324,7 @@ xfs_acl_vset( | |||
| 323 | if (!basicperms) { | 324 | if (!basicperms) { | 
| 324 | xfs_acl_set_attr(vp, xfs_acl, kind, &error); | 325 | xfs_acl_set_attr(vp, xfs_acl, kind, &error); | 
| 325 | } else { | 326 | } else { | 
| 326 | xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); | 327 | error = -xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); | 
| 327 | } | 328 | } | 
| 328 | 329 | ||
| 329 | out: | 330 | out: | 
| @@ -707,7 +708,9 @@ xfs_acl_inherit( | |||
| 707 | 708 | ||
| 708 | memcpy(cacl, pdaclp, sizeof(xfs_acl_t)); | 709 | memcpy(cacl, pdaclp, sizeof(xfs_acl_t)); | 
| 709 | xfs_acl_filter_mode(mode, cacl); | 710 | xfs_acl_filter_mode(mode, cacl); | 
| 710 | xfs_acl_setmode(vp, cacl, &basicperms); | 711 | error = xfs_acl_setmode(vp, cacl, &basicperms); | 
| 712 | if (error) | ||
| 713 | goto out_error; | ||
| 711 | 714 | ||
| 712 | /* | 715 | /* | 
| 713 | * Set the Default and Access ACL on the file. The mode is already | 716 | * Set the Default and Access ACL on the file. The mode is already | 
| @@ -720,6 +723,7 @@ xfs_acl_inherit( | |||
| 720 | xfs_acl_set_attr(vp, pdaclp, _ACL_TYPE_DEFAULT, &error); | 723 | xfs_acl_set_attr(vp, pdaclp, _ACL_TYPE_DEFAULT, &error); | 
| 721 | if (!error && !basicperms) | 724 | if (!error && !basicperms) | 
| 722 | xfs_acl_set_attr(vp, cacl, _ACL_TYPE_ACCESS, &error); | 725 | xfs_acl_set_attr(vp, cacl, _ACL_TYPE_ACCESS, &error); | 
| 726 | out_error: | ||
| 723 | _ACL_FREE(cacl); | 727 | _ACL_FREE(cacl); | 
| 724 | return error; | 728 | return error; | 
| 725 | } | 729 | } | 
