mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
jffs2/jfs/xfs: switch over to 'check_acl' rather than 'permission()'
This avoids an indirect call in the VFS for each path component lookup. Well, at least as long as you own the directory in question, and the ACL check is unnecessary. Reviewed-by: James Morris <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1d5ccd1c42
commit
18f4c64477
10 changed files with 14 additions and 32 deletions
|
|
@ -114,7 +114,7 @@ out:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int jfs_check_acl(struct inode *inode, int mask)
|
||||
int jfs_check_acl(struct inode *inode, int mask)
|
||||
{
|
||||
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
|
||||
|
||||
|
|
@ -129,11 +129,6 @@ static int jfs_check_acl(struct inode *inode, int mask)
|
|||
return -EAGAIN;
|
||||
}
|
||||
|
||||
int jfs_permission(struct inode *inode, int mask)
|
||||
{
|
||||
return generic_permission(inode, mask, jfs_check_acl);
|
||||
}
|
||||
|
||||
int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
|
||||
{
|
||||
struct posix_acl *acl = NULL;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ const struct inode_operations jfs_file_inode_operations = {
|
|||
.removexattr = jfs_removexattr,
|
||||
#ifdef CONFIG_JFS_POSIX_ACL
|
||||
.setattr = jfs_setattr,
|
||||
.permission = jfs_permission,
|
||||
.check_acl = jfs_check_acl,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#ifdef CONFIG_JFS_POSIX_ACL
|
||||
|
||||
int jfs_permission(struct inode *, int);
|
||||
int jfs_check_acl(struct inode *, int);
|
||||
int jfs_init_acl(tid_t, struct inode *, struct inode *);
|
||||
int jfs_setattr(struct dentry *, struct iattr *);
|
||||
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ const struct inode_operations jfs_dir_inode_operations = {
|
|||
.removexattr = jfs_removexattr,
|
||||
#ifdef CONFIG_JFS_POSIX_ACL
|
||||
.setattr = jfs_setattr,
|
||||
.permission = jfs_permission,
|
||||
.check_acl = jfs_check_acl,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue