Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1597988 > unrolled thread
| Started by | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| First post | 2017-03-10 19:00 +0100 |
| Last post | 2017-03-11 01:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] f2fs: le16_to_cpu for xattr->e_value_size Jaegeuk Kim <jaegeuk@kernel.org> - 2017-03-10 19:00 +0100
Re: [f2fs-dev] [PATCH 1/2] f2fs: le16_to_cpu for xattr->e_value_size Kinglong Mee <kinglongmee@gmail.com> - 2017-03-11 01:10 +0100
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Date | 2017-03-10 19:00 +0100 |
| Subject | [PATCH 1/2] f2fs: le16_to_cpu for xattr->e_value_size |
| Message-ID | <tjwZA-7md-25@gated-at.bofh.it> |
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")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/xattr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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,
--
2.11.0
[toc] | [next] | [standalone]
| From | Kinglong Mee <kinglongmee@gmail.com> |
|---|---|
| Date | 2017-03-11 01:10 +0100 |
| Subject | Re: [f2fs-dev] [PATCH 1/2] f2fs: le16_to_cpu for xattr->e_value_size |
| Message-ID | <tjCLD-32T-5@gated-at.bofh.it> |
| In reply to | #1597988 |
On 3/11/2017 01:53, Jaegeuk Kim wrote:
> 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")
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
> fs/f2fs/xattr.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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,
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web