aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r--fs/ocfs2/xattr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 9ec7136b3ad7..090449f9263e 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -564,6 +564,9 @@ ssize_t ocfs2_listxattr(struct dentry *dentry,
564 struct ocfs2_dinode *di = NULL; 564 struct ocfs2_dinode *di = NULL;
565 struct ocfs2_inode_info *oi = OCFS2_I(dentry->d_inode); 565 struct ocfs2_inode_info *oi = OCFS2_I(dentry->d_inode);
566 566
567 if (!ocfs2_supports_xattr(OCFS2_SB(dentry->d_sb)))
568 return -EOPNOTSUPP;
569
567 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL)) 570 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL))
568 return ret; 571 return ret;
569 572
@@ -843,6 +846,9 @@ int ocfs2_xattr_get(struct inode *inode,
843 .not_found = -ENODATA, 846 .not_found = -ENODATA,
844 }; 847 };
845 848
849 if (!ocfs2_supports_xattr(OCFS2_SB(inode->i_sb)))
850 return -EOPNOTSUPP;
851
846 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL)) 852 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL))
847 ret = -ENODATA; 853 ret = -ENODATA;
848 854
@@ -1541,6 +1547,9 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh)
1541 handle_t *handle; 1547 handle_t *handle;
1542 int ret; 1548 int ret;
1543 1549
1550 if (!ocfs2_supports_xattr(OCFS2_SB(inode->i_sb)))
1551 return 0;
1552
1544 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL)) 1553 if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL))
1545 return 0; 1554 return 0;
1546 1555
@@ -1977,6 +1986,9 @@ int ocfs2_xattr_set(struct inode *inode,
1977 .not_found = -ENODATA, 1986 .not_found = -ENODATA,
1978 }; 1987 };
1979 1988
1989 if (!ocfs2_supports_xattr(OCFS2_SB(inode->i_sb)))
1990 return -EOPNOTSUPP;
1991
1980 ret = ocfs2_inode_lock(inode, &di_bh, 1); 1992 ret = ocfs2_inode_lock(inode, &di_bh, 1);
1981 if (ret < 0) { 1993 if (ret < 0) {
1982 mlog_errno(ret); 1994 mlog_errno(ret);