From bd9926e80330d43f15b710c2935fa41b792d56fd Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 11 Dec 2012 03:31:49 -0500 Subject: ext4: zero out inline data using memset() instead of empty_zero_page Not all architectures (in particular, sparc64) have empty_zero_page. So instead of copying from empty_zero_page, use memset to clear the inline data by signalling to ext4_xattr_set_entry() via a magic pointer value, EXT4_ZERO_ATTR_VALUE, which is defined by casting -1 to a pointer. This fixes a build failure on sparc64, and the memset() should be more efficient than using memcpy() anyway. Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" --- fs/ext4/xattr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/ext4/xattr.h') diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h index 7b5513ed3b38..69eda787a96a 100644 --- a/fs/ext4/xattr.h +++ b/fs/ext4/xattr.h @@ -71,6 +71,7 @@ struct ext4_xattr_entry { #define BFIRST(bh) ENTRY(BHDR(bh)+1) #define IS_LAST_ENTRY(entry) (*(__u32 *)(entry) == 0) +#define EXT4_ZERO_XATTR_VALUE ((void *)-1) struct ext4_xattr_info { int name_index; -- cgit