diff options
author | Christoph Hellwig <hch@lst.de> | 2009-06-10 11:07:47 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-06-10 11:07:47 -0400 |
commit | ef14f0c1578dce4b688726eb2603e50b62d6665a (patch) | |
tree | 5a221081850fab8f96455745e90f4a0e2127bce0 /fs/xfs/xfs_vnodeops.c | |
parent | 8b5403a6d772d340541cfb30a668fde119c40ac1 (diff) |
xfs: use generic Posix ACL code
This patch rips out the XFS ACL handling code and uses the generic
fs/posix_acl.c code instead. The ondisk format is of course left
unchanged.
This also introduces the same ACL caching all other Linux filesystems do
by adding pointers to the acl and default acl in struct xfs_inode.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index b56321b2b9f0..c4eca5ed5dab 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "xfs_ialloc.h" | 42 | #include "xfs_ialloc.h" |
43 | #include "xfs_alloc.h" | 43 | #include "xfs_alloc.h" |
44 | #include "xfs_bmap.h" | 44 | #include "xfs_bmap.h" |
45 | #include "xfs_acl.h" | ||
45 | #include "xfs_attr.h" | 46 | #include "xfs_attr.h" |
46 | #include "xfs_rw.h" | 47 | #include "xfs_rw.h" |
47 | #include "xfs_error.h" | 48 | #include "xfs_error.h" |
@@ -467,8 +468,20 @@ xfs_setattr( | |||
467 | xfs_qm_dqrele(udqp); | 468 | xfs_qm_dqrele(udqp); |
468 | xfs_qm_dqrele(gdqp); | 469 | xfs_qm_dqrele(gdqp); |
469 | 470 | ||
470 | if (code) { | 471 | if (code) |
471 | return code; | 472 | return code; |
473 | |||
474 | /* | ||
475 | * XXX(hch): Updating the ACL entries is not atomic vs the i_mode | ||
476 | * update. We could avoid this with linked transactions | ||
477 | * and passing down the transaction pointer all the way | ||
478 | * to attr_set. No previous user of the generic | ||
479 | * Posix ACL code seems to care about this issue either. | ||
480 | */ | ||
481 | if ((mask & ATTR_MODE) && !(flags & XFS_ATTR_NOACL)) { | ||
482 | code = -xfs_acl_chmod(inode); | ||
483 | if (code) | ||
484 | return XFS_ERROR(code); | ||
472 | } | 485 | } |
473 | 486 | ||
474 | if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) && | 487 | if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) && |