diff options
author | Tiger Yang <tiger.yang@oracle.com> | 2008-12-16 21:22:56 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:40:36 -0500 |
commit | 38d59ef61c11cafc50a66787bdbbe80d58bbd9c0 (patch) | |
tree | 6b8c730648dfd71374ed727646e2f54c828a98e8 /fs/ocfs2 | |
parent | 008aafaf0b4aa0476da483e3c6e3edbe951811ff (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/ocfs2')
-rw-r--r-- | fs/ocfs2/xattr.c | 3 |
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, | |||
5324 | struct inode *dir, | 5324 | struct inode *dir, |
5325 | struct ocfs2_security_xattr_info *si) | 5325 | struct ocfs2_security_xattr_info *si) |
5326 | { | 5326 | { |
5327 | /* check whether ocfs2 support feature xattr */ | ||
5328 | if (!ocfs2_supports_xattr(OCFS2_SB(dir->i_sb))) | ||
5329 | return -EOPNOTSUPP; | ||
5327 | return security_inode_init_security(inode, dir, &si->name, &si->value, | 5330 | return security_inode_init_security(inode, dir, &si->name, &si->value, |
5328 | &si->value_len); | 5331 | &si->value_len); |
5329 | } | 5332 | } |