Skip to content

Commit

Permalink
ocfs2: Add xattr support checking in init_security
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Fasheh <[email protected]>
  • Loading branch information
Tiger Yang authored and Mark Fasheh committed Jan 5, 2009
1 parent 008aafa commit 38d59ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 38d59ef

Please sign in to comment.