提交 ceb1eba3 编写于 作者: T Tiger Yang 提交者: Mark Fasheh

ocfs2: remove duplicate definition in xattr

Include/linux/xattr.h already has the definition about xattr prefix,
so remove the duplicate definitions in xattr.c.
Signed-off-by: NTiger Yang <tiger.yang@oracle.com>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
Signed-off-by: NMark Fasheh <mfasheh@suse.com>
上级 0030e001
......@@ -4740,14 +4740,11 @@ static int ocfs2_delete_xattr_index_block(struct inode *inode,
/*
* 'trusted' attributes support
*/
#define XATTR_TRUSTED_PREFIX "trusted."
static size_t ocfs2_xattr_trusted_list(struct inode *inode, char *list,
size_t list_size, const char *name,
size_t name_len)
{
const size_t prefix_len = sizeof(XATTR_TRUSTED_PREFIX) - 1;
const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
const size_t total_len = prefix_len + name_len + 1;
if (list && total_len <= list_size) {
......@@ -4784,18 +4781,14 @@ struct xattr_handler ocfs2_xattr_trusted_handler = {
.set = ocfs2_xattr_trusted_set,
};
/*
* 'user' attributes support
*/
#define XATTR_USER_PREFIX "user."
static size_t ocfs2_xattr_user_list(struct inode *inode, char *list,
size_t list_size, const char *name,
size_t name_len)
{
const size_t prefix_len = sizeof(XATTR_USER_PREFIX) - 1;
const size_t prefix_len = XATTR_USER_PREFIX_LEN;
const size_t total_len = prefix_len + name_len + 1;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册