aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/xattr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-09 12:11:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:17:07 -0400
commit073aaa1b142461d91f83da66db1184d7c1b1edea (patch)
tree2b54d185d78f1229418fca521a93e6b55c57248b /fs/jfs/xattr.c
parent06b16e9f68edaa1e71aee943d3c030bcf7380af1 (diff)
helpers for acl caching + switch to those
helpers: get_cached_acl(inode, type), set_cached_acl(inode, type, acl), forget_cached_acl(inode, type). ubifs/xattr.c needed includes reordered, the rest is a plain switchover. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jfs/xattr.c')
-rw-r--r--fs/jfs/xattr.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index f6e90e343593..fad364548bc9 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -727,10 +727,7 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
727 /* 727 /*
728 * We're changing the ACL. Get rid of the cached one 728 * We're changing the ACL. Get rid of the cached one
729 */ 729 */
730 acl =inode->i_acl; 730 forget_cached_acl(inode, ACL_TYPE_ACCESS);
731 if (acl != ACL_NOT_CACHED)
732 posix_acl_release(acl);
733 inode->i_acl = ACL_NOT_CACHED;
734 731
735 return 0; 732 return 0;
736 } else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0) { 733 } else if (strcmp(name, POSIX_ACL_XATTR_DEFAULT) == 0) {
@@ -746,10 +743,7 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
746 /* 743 /*
747 * We're changing the default ACL. Get rid of the cached one 744 * We're changing the default ACL. Get rid of the cached one
748 */ 745 */
749 acl = inode->i_default_acl; 746 forget_cached_acl(inode, ACL_TYPE_DEFAULT);
750 if (acl && (acl != ACL_NOT_CACHED))
751 posix_acl_release(acl);
752 inode->i_default_acl = ACL_NOT_CACHED;
753 747
754 return 0; 748 return 0;
755 } 749 }