aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r--fs/reiserfs/xattr.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 3e9e82ca3ba2..c5fc207e529c 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -633,14 +633,14 @@ __reiserfs_xattr_del(struct dentry *xadir, const char *name, int namelen)
633 if (S_ISDIR(dentry->d_inode->i_mode)) 633 if (S_ISDIR(dentry->d_inode->i_mode))
634 goto out_file; 634 goto out_file;
635 635
636 if (!is_reiserfs_priv_object(dentry->d_inode)) { 636 if (!IS_PRIVATE(dentry->d_inode)) {
637 reiserfs_error(dir->i_sb, "jdm-20003", 637 reiserfs_error(dir->i_sb, "jdm-20003",
638 "OID %08x [%.*s/%.*s] doesn't have " 638 "OID %08x [%.*s/%.*s] doesn't have "
639 "priv flag set [parent is %sset].", 639 "priv flag set [parent is %sset].",
640 le32_to_cpu(INODE_PKEY(dentry->d_inode)-> 640 le32_to_cpu(INODE_PKEY(dentry->d_inode)->
641 k_objectid), xadir->d_name.len, 641 k_objectid), xadir->d_name.len,
642 xadir->d_name.name, namelen, name, 642 xadir->d_name.name, namelen, name,
643 is_reiserfs_priv_object(xadir->d_inode) ? "" : 643 IS_PRIVATE(xadir->d_inode) ? "" :
644 "not "); 644 "not ");
645 dput(dentry); 645 dput(dentry);
646 return -EIO; 646 return -EIO;
@@ -701,8 +701,7 @@ int reiserfs_delete_xattrs(struct inode *inode)
701 int err = 0; 701 int err = 0;
702 702
703 /* Skip out, an xattr has no xattrs associated with it */ 703 /* Skip out, an xattr has no xattrs associated with it */
704 if (is_reiserfs_priv_object(inode) || 704 if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1 ||
705 get_inode_sd_version(inode) == STAT_DATA_V1 ||
706 !reiserfs_xattrs(inode->i_sb)) { 705 !reiserfs_xattrs(inode->i_sb)) {
707 return 0; 706 return 0;
708 } 707 }
@@ -786,8 +785,7 @@ int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
786 unsigned int ia_valid = attrs->ia_valid; 785 unsigned int ia_valid = attrs->ia_valid;
787 786
788 /* Skip out, an xattr has no xattrs associated with it */ 787 /* Skip out, an xattr has no xattrs associated with it */
789 if (is_reiserfs_priv_object(inode) || 788 if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1 ||
790 get_inode_sd_version(inode) == STAT_DATA_V1 ||
791 !reiserfs_xattrs(inode->i_sb)) { 789 !reiserfs_xattrs(inode->i_sb)) {
792 return 0; 790 return 0;
793 } 791 }
@@ -1178,7 +1176,7 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags)
1178 1176
1179 if (!err && dentry) { 1177 if (!err && dentry) {
1180 s->s_root->d_op = &xattr_lookup_poison_ops; 1178 s->s_root->d_op = &xattr_lookup_poison_ops;
1181 reiserfs_mark_inode_private(dentry->d_inode); 1179 dentry->d_inode->i_flags |= S_PRIVATE;
1182 REISERFS_SB(s)->priv_root = dentry; 1180 REISERFS_SB(s)->priv_root = dentry;
1183 } else if (!(mount_flags & MS_RDONLY)) { /* xattrs are unavailable */ 1181 } else if (!(mount_flags & MS_RDONLY)) { /* xattrs are unavailable */
1184 /* If we're read-only it just means that the dir hasn't been 1182 /* If we're read-only it just means that the dir hasn't been
@@ -1239,7 +1237,7 @@ int reiserfs_permission(struct inode *inode, int mask)
1239 * We don't do permission checks on the internal objects. 1237 * We don't do permission checks on the internal objects.
1240 * Permissions are determined by the "owning" object. 1238 * Permissions are determined by the "owning" object.
1241 */ 1239 */
1242 if (is_reiserfs_priv_object(inode)) 1240 if (IS_PRIVATE(inode))
1243 return 0; 1241 return 0;
1244 1242
1245 /* 1243 /*