diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:58 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:29 -0500 |
commit | b74c79e99389cd79b31fcc08f82c24e492e63c7e (patch) | |
tree | 763c6b412517306670bc625e90035f2d16bb739f /fs/reiserfs/xattr.c | |
parent | 34286d6662308d82aed891852d04c7c3a2649b16 (diff) |
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r-- | fs/reiserfs/xattr.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 9ea22a56cdf1..3cfb2e933644 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -870,11 +870,14 @@ out: | |||
870 | return err; | 870 | return err; |
871 | } | 871 | } |
872 | 872 | ||
873 | static int reiserfs_check_acl(struct inode *inode, int mask) | 873 | static int reiserfs_check_acl(struct inode *inode, int mask, unsigned int flags) |
874 | { | 874 | { |
875 | struct posix_acl *acl; | 875 | struct posix_acl *acl; |
876 | int error = -EAGAIN; /* do regular unix permission checks by default */ | 876 | int error = -EAGAIN; /* do regular unix permission checks by default */ |
877 | 877 | ||
878 | if (flags & IPERM_FLAG_RCU) | ||
879 | return -ECHILD; | ||
880 | |||
878 | acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS); | 881 | acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS); |
879 | 882 | ||
880 | if (acl) { | 883 | if (acl) { |
@@ -951,8 +954,10 @@ static int xattr_mount_check(struct super_block *s) | |||
951 | return 0; | 954 | return 0; |
952 | } | 955 | } |
953 | 956 | ||
954 | int reiserfs_permission(struct inode *inode, int mask) | 957 | int reiserfs_permission(struct inode *inode, int mask, unsigned int flags) |
955 | { | 958 | { |
959 | if (flags & IPERM_FLAG_RCU) | ||
960 | return -ECHILD; | ||
956 | /* | 961 | /* |
957 | * We don't do permission checks on the internal objects. | 962 | * We don't do permission checks on the internal objects. |
958 | * Permissions are determined by the "owning" object. | 963 | * Permissions are determined by the "owning" object. |
@@ -965,9 +970,10 @@ int reiserfs_permission(struct inode *inode, int mask) | |||
965 | * Stat data v1 doesn't support ACLs. | 970 | * Stat data v1 doesn't support ACLs. |
966 | */ | 971 | */ |
967 | if (get_inode_sd_version(inode) != STAT_DATA_V1) | 972 | if (get_inode_sd_version(inode) != STAT_DATA_V1) |
968 | return generic_permission(inode, mask, reiserfs_check_acl); | 973 | return generic_permission(inode, mask, flags, |
974 | reiserfs_check_acl); | ||
969 | #endif | 975 | #endif |
970 | return generic_permission(inode, mask, NULL); | 976 | return generic_permission(inode, mask, flags, NULL); |
971 | } | 977 | } |
972 | 978 | ||
973 | static int xattr_hide_revalidate(struct dentry *dentry, struct nameidata *nd) | 979 | static int xattr_hide_revalidate(struct dentry *dentry, struct nameidata *nd) |