Skip to content

Commit

Permalink
f2fs: le16_to_cpu for xattr->e_value_size
Browse files Browse the repository at this point in the history
This patch fixes missing le16 conversion, reported by kbuild test robot.

Fixes: 5f35a2c ("f2fs: Don't update the xattr data that same as the exist")
Reviewed-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Jaegeuk Kim committed Mar 21, 2017
1 parent 4f29544 commit b71dead
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/f2fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b71dead

Please sign in to comment.