Skip to contentSkip to conversation

ocfs2: Add xattr support checking in init_security

PATCH New Tiger Yang 1 participant 1 message Dec 17, 2008 OCFS2

lore
Share & tools
lore

Tiger Yang

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/xattr.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/xattr.c +3 -0
index a24cf88..bde9d6d 100644
@@ -5273,6 +5273,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);
 }
Signature · 1 line
1.5.4.1