summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2008-12-17 10:22:56 +0800
committerMark Fasheh <mfasheh@suse.com>2008-12-31 15:50:45 -0800
commitc180a32e7655a24ddba434ef543c43e1b61580cc (patch)
tree920e5670f031ebddbb5ff96278af1a6902342698 /fs
parent053f161248d99d816c40f503a2e776fbc0a0699c (diff)
ocfs2: Add xattr support checking in init_security
We must check whether ocfs2 volume support xattr in init_security, if not support xattr and security is enable, would cause failure of mknod. Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/xattr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 095b0bb6e590..e1d638af6ac3 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -5324,6 +5324,9 @@ int ocfs2_init_security_get(struct inode *inode,
struct inode *dir,
struct ocfs2_security_xattr_info *si)
{
+ /* check whether ocfs2 support feature xattr */
+ if (!ocfs2_supports_xattr(OCFS2_SB(dir->i_sb)))
+ return -EOPNOTSUPP;
return security_inode_init_security(inode, dir, &si->name, &si->value,
&si->value_len);
}