diff options
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r-- | fs/reiserfs/xattr.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 5d04a7828e7a..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,13 +970,16 @@ 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) |
974 | { | 980 | { |
981 | if (nd->flags & LOOKUP_RCU) | ||
982 | return -ECHILD; | ||
975 | return -EPERM; | 983 | return -EPERM; |
976 | } | 984 | } |
977 | 985 | ||
@@ -990,7 +998,7 @@ int reiserfs_lookup_privroot(struct super_block *s) | |||
990 | strlen(PRIVROOT_NAME)); | 998 | strlen(PRIVROOT_NAME)); |
991 | if (!IS_ERR(dentry)) { | 999 | if (!IS_ERR(dentry)) { |
992 | REISERFS_SB(s)->priv_root = dentry; | 1000 | REISERFS_SB(s)->priv_root = dentry; |
993 | dentry->d_op = &xattr_lookup_poison_ops; | 1001 | d_set_d_op(dentry, &xattr_lookup_poison_ops); |
994 | if (dentry->d_inode) | 1002 | if (dentry->d_inode) |
995 | dentry->d_inode->i_flags |= S_PRIVATE; | 1003 | dentry->d_inode->i_flags |= S_PRIVATE; |
996 | } else | 1004 | } else |