aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/xattr.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 628075ca82c1..8e7deb0e6964 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -871,23 +871,6 @@ static int reiserfs_check_acl(struct inode *inode, int mask)
871 return error; 871 return error;
872} 872}
873 873
874int reiserfs_permission(struct inode *inode, int mask)
875{
876 /*
877 * We don't do permission checks on the internal objects.
878 * Permissions are determined by the "owning" object.
879 */
880 if (IS_PRIVATE(inode))
881 return 0;
882 /*
883 * Stat data v1 doesn't support ACLs.
884 */
885 if (get_inode_sd_version(inode) == STAT_DATA_V1)
886 return generic_permission(inode, mask, NULL);
887 else
888 return generic_permission(inode, mask, reiserfs_check_acl);
889}
890
891static int create_privroot(struct dentry *dentry) 874static int create_privroot(struct dentry *dentry)
892{ 875{
893 int err; 876 int err;
@@ -951,6 +934,25 @@ static int xattr_mount_check(struct super_block *s)
951 return 0; 934 return 0;
952} 935}
953 936
937int reiserfs_permission(struct inode *inode, int mask)
938{
939 /*
940 * We don't do permission checks on the internal objects.
941 * Permissions are determined by the "owning" object.
942 */
943 if (IS_PRIVATE(inode))
944 return 0;
945
946#ifdef CONFIG_REISERFS_FS_XATTR
947 /*
948 * Stat data v1 doesn't support ACLs.
949 */
950 if (get_inode_sd_version(inode) != STAT_DATA_V1)
951 return generic_permission(inode, mask, reiserfs_check_acl);
952#endif
953 return generic_permission(inode, mask, NULL);
954}
955
954/* This will catch lookups from the fs root to .reiserfs_priv */ 956/* This will catch lookups from the fs root to .reiserfs_priv */
955static int 957static int
956xattr_lookup_poison(struct dentry *dentry, struct qstr *q1, struct qstr *name) 958xattr_lookup_poison(struct dentry *dentry, struct qstr *q1, struct qstr *name)