mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
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>
This commit is contained in:
parent
008aafaf0b
commit
38d59ef61c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user