summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-03-10 09:36:10 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-21 16:52:16 -0400
commitb71deadbc4d0271cd3b298e57ad8be70b0c391c3 (patch)
treec6eea08e749602fa8277d10a376b701675461821 /fs
parent4f295443bff1701430249beec5eb9dc875decc9c (diff)
downloadlinux-b71deadbc4d0271cd3b298e57ad8be70b0c391c3.tar.gz
linux-b71deadbc4d0271cd3b298e57ad8be70b0c391c3.tar.bz2
linux-b71deadbc4d0271cd3b298e57ad8be70b0c391c3.zip
f2fs: le16_to_cpu for xattr->e_value_size
This patch fixes missing le16 conversion, reported by kbuild test robot. Fixes: 5f35a2cd5 ("f2fs: Don't update the xattr data that same as the exist") Reviewed-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/xattr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 7298a4488f7f..aff7619e3f96 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -546,7 +546,9 @@ static bool f2fs_xattr_value_same(struct f2fs_xattr_entry *entry,
const void *value, size_t size)
{
void *pval = entry->e_name + entry->e_name_len;
- return (entry->e_value_size == size) && !memcmp(pval, value, size);
+
+ return (le16_to_cpu(entry->e_value_size) == size) &&
+ !memcmp(pval, value, size);
}
static int __f2fs_setxattr(struct inode *inode, int index,