diff options
author | Christoph Hellwig <hch@lst.de> | 2011-07-23 11:37:31 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-25 14:30:23 -0400 |
commit | 4e34e719e457f2e031297175410fc0bd4016a085 (patch) | |
tree | ab969a371e0d2efc6bfbf503ca6cdfce3af3bf6c /fs/btrfs/inode.c | |
parent | edde854e8bb34a7f32fa993d721f1da0faf64165 (diff) |
fs: take the ACL checks to common code
Replace the ->check_acl method with a ->get_acl method that simply reads an
ACL from disk after having a cache miss. This means we can replace the ACL
checking boilerplate code with a single implementation in namei.c.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2548a04a0230..e91b097e7252 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7351,12 +7351,12 @@ static const struct inode_operations btrfs_dir_inode_operations = { | |||
7351 | .listxattr = btrfs_listxattr, | 7351 | .listxattr = btrfs_listxattr, |
7352 | .removexattr = btrfs_removexattr, | 7352 | .removexattr = btrfs_removexattr, |
7353 | .permission = btrfs_permission, | 7353 | .permission = btrfs_permission, |
7354 | .check_acl = btrfs_check_acl, | 7354 | .get_acl = btrfs_get_acl, |
7355 | }; | 7355 | }; |
7356 | static const struct inode_operations btrfs_dir_ro_inode_operations = { | 7356 | static const struct inode_operations btrfs_dir_ro_inode_operations = { |
7357 | .lookup = btrfs_lookup, | 7357 | .lookup = btrfs_lookup, |
7358 | .permission = btrfs_permission, | 7358 | .permission = btrfs_permission, |
7359 | .check_acl = btrfs_check_acl, | 7359 | .get_acl = btrfs_get_acl, |
7360 | }; | 7360 | }; |
7361 | 7361 | ||
7362 | static const struct file_operations btrfs_dir_file_operations = { | 7362 | static const struct file_operations btrfs_dir_file_operations = { |
@@ -7425,7 +7425,7 @@ static const struct inode_operations btrfs_file_inode_operations = { | |||
7425 | .removexattr = btrfs_removexattr, | 7425 | .removexattr = btrfs_removexattr, |
7426 | .permission = btrfs_permission, | 7426 | .permission = btrfs_permission, |
7427 | .fiemap = btrfs_fiemap, | 7427 | .fiemap = btrfs_fiemap, |
7428 | .check_acl = btrfs_check_acl, | 7428 | .get_acl = btrfs_get_acl, |
7429 | }; | 7429 | }; |
7430 | static const struct inode_operations btrfs_special_inode_operations = { | 7430 | static const struct inode_operations btrfs_special_inode_operations = { |
7431 | .getattr = btrfs_getattr, | 7431 | .getattr = btrfs_getattr, |
@@ -7435,7 +7435,7 @@ static const struct inode_operations btrfs_special_inode_operations = { | |||
7435 | .getxattr = btrfs_getxattr, | 7435 | .getxattr = btrfs_getxattr, |
7436 | .listxattr = btrfs_listxattr, | 7436 | .listxattr = btrfs_listxattr, |
7437 | .removexattr = btrfs_removexattr, | 7437 | .removexattr = btrfs_removexattr, |
7438 | .check_acl = btrfs_check_acl, | 7438 | .get_acl = btrfs_get_acl, |
7439 | }; | 7439 | }; |
7440 | static const struct inode_operations btrfs_symlink_inode_operations = { | 7440 | static const struct inode_operations btrfs_symlink_inode_operations = { |
7441 | .readlink = generic_readlink, | 7441 | .readlink = generic_readlink, |
@@ -7447,7 +7447,7 @@ static const struct inode_operations btrfs_symlink_inode_operations = { | |||
7447 | .getxattr = btrfs_getxattr, | 7447 | .getxattr = btrfs_getxattr, |
7448 | .listxattr = btrfs_listxattr, | 7448 | .listxattr = btrfs_listxattr, |
7449 | .removexattr = btrfs_removexattr, | 7449 | .removexattr = btrfs_removexattr, |
7450 | .check_acl = btrfs_check_acl, | 7450 | .get_acl = btrfs_get_acl, |
7451 | }; | 7451 | }; |
7452 | 7452 | ||
7453 | const struct dentry_operations btrfs_dentry_operations = { | 7453 | const struct dentry_operations btrfs_dentry_operations = { |