mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
4f295443bf
commit
b71deadbc4
1 changed files with 3 additions and 1 deletions
|
@ -546,7 +546,9 @@ static bool f2fs_xattr_value_same(struct f2fs_xattr_entry *entry,
|
||||||
const void *value, size_t size)
|
const void *value, size_t size)
|
||||||
{
|
{
|
||||||
void *pval = entry->e_name + entry->e_name_len;
|
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,
|
static int __f2fs_setxattr(struct inode *inode, int index,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue