You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
+2
-8
@@ -727,10 +727,7 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
|
||||
/*
|
||||
* We're changing the ACL. Get rid of the cached one
|
||||
*/
|
||||
acl =inode->i_acl;
|
||||
if (acl != ACL_NOT_CACHED)
|
||||
posix_acl_release(acl);
|
||||
inode->i_acl = ACL_NOT_CACHED;
|
||||
forget_cached_acl(inode, ACL_TYPE_ACCESS);
|
||||
|
||||
return 0;
|
||||
} 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,
|
||||
/*
|
||||
* We're changing the default ACL. Get rid of the cached one
|
||||
*/
|
||||
acl = inode->i_default_acl;
|
||||
if (acl && (acl != ACL_NOT_CACHED))
|
||||
posix_acl_release(acl);
|
||||
inode->i_default_acl = ACL_NOT_CACHED;
|
||||
forget_cached_acl(inode, ACL_TYPE_DEFAULT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user