aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/xattr.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 420d8e30b184..a9da45bbb9ed 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -4740,14 +4740,11 @@ out:
4740/* 4740/*
4741 * 'trusted' attributes support 4741 * 'trusted' attributes support
4742 */ 4742 */
4743
4744#define XATTR_TRUSTED_PREFIX "trusted."
4745
4746static size_t ocfs2_xattr_trusted_list(struct inode *inode, char *list, 4743static size_t ocfs2_xattr_trusted_list(struct inode *inode, char *list,
4747 size_t list_size, const char *name, 4744 size_t list_size, const char *name,
4748 size_t name_len) 4745 size_t name_len)
4749{ 4746{
4750 const size_t prefix_len = sizeof(XATTR_TRUSTED_PREFIX) - 1; 4747 const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
4751 const size_t total_len = prefix_len + name_len + 1; 4748 const size_t total_len = prefix_len + name_len + 1;
4752 4749
4753 if (list && total_len <= list_size) { 4750 if (list && total_len <= list_size) {
@@ -4784,18 +4781,14 @@ struct xattr_handler ocfs2_xattr_trusted_handler = {
4784 .set = ocfs2_xattr_trusted_set, 4781 .set = ocfs2_xattr_trusted_set,
4785}; 4782};
4786 4783
4787
4788/* 4784/*
4789 * 'user' attributes support 4785 * 'user' attributes support
4790 */ 4786 */
4791
4792#define XATTR_USER_PREFIX "user."
4793
4794static size_t ocfs2_xattr_user_list(struct inode *inode, char *list, 4787static size_t ocfs2_xattr_user_list(struct inode *inode, char *list,
4795 size_t list_size, const char *name, 4788 size_t list_size, const char *name,
4796 size_t name_len) 4789 size_t name_len)
4797{ 4790{
4798 const size_t prefix_len = sizeof(XATTR_USER_PREFIX) - 1; 4791 const size_t prefix_len = XATTR_USER_PREFIX_LEN;
4799 const size_t total_len = prefix_len + name_len + 1; 4792 const size_t total_len = prefix_len + name_len + 1;
4800 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 4793 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
4801 4794