From: Tiger Yang Date: Wed, 17 Dec 2008 02:22:56 +0000 (+0800) Subject: ocfs2: Add xattr support checking in init_security X-Git-Tag: v2.6.29-rc1~505^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=38d59ef61c11cafc50a66787bdbbe80d58bbd9c0;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 095b0bb6e59..e1d638af6ac 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); }