Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89418
b: refs/heads/master
c: 0c92829
h: refs/heads/master
v: v3
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Apr 18, 2008
1 parent 8834fc4 commit 46222a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88ab02085363b7c45935d66ab3e969b4fec9a20c
refs/heads/master: 0c928299676c8df2b00e75d5691cd4846e6c0868
14 changes: 9 additions & 5 deletions trunk/fs/xfs/xfs_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ xfs_acl_vset(

VN_HOLD(vp);
error = xfs_acl_allow_set(vp, kind);
if (error)
goto out;

/* Incoming ACL exists, set file mode based on its value */
if (kind == _ACL_TYPE_ACCESS)
xfs_acl_setmode(vp, xfs_acl, &basicperms);
if (!error && kind == _ACL_TYPE_ACCESS)
error = xfs_acl_setmode(vp, xfs_acl, &basicperms);

if (error)
goto out;

/*
* If we have more than std unix permissions, set up the actual attr.
Expand Down Expand Up @@ -707,7 +708,9 @@ xfs_acl_inherit(

memcpy(cacl, pdaclp, sizeof(xfs_acl_t));
xfs_acl_filter_mode(mode, cacl);
xfs_acl_setmode(vp, cacl, &basicperms);
error = xfs_acl_setmode(vp, cacl, &basicperms);
if (error)
goto out_error;

/*
* Set the Default and Access ACL on the file. The mode is already
Expand All @@ -720,6 +723,7 @@ xfs_acl_inherit(
xfs_acl_set_attr(vp, pdaclp, _ACL_TYPE_DEFAULT, &error);
if (!error && !basicperms)
xfs_acl_set_attr(vp, cacl, _ACL_TYPE_ACCESS, &error);
out_error:
_ACL_FREE(cacl);
return error;
}
Expand Down

0 comments on commit 46222a6

Please sign in to comment.