diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-26 09:20:01 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-26 09:20:01 +0200 |
commit | 3cb9bc85029f2ceb7a5babadcab445c7cb861da8 (patch) | |
tree | 6453e9ebb9ad3b3cab07ff31dc9a90ea9f7951bc /fs/ext4/xattr.c | |
parent | f1a5b53570001b1bcbf890ac6c4be1db99f8cc28 (diff) | |
parent | 413d63d71b222108d19703f3fd5cf9108652a730 (diff) |
Merge branch 'x86/mm' into efi/core, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r-- | fs/ext4/xattr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 82a5af9f6668..3dd970168448 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1543,7 +1543,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i, /* Clear padding bytes. */ memset(val + i->value_len, 0, new_size - i->value_len); } - return 0; + goto update_hash; } /* Compute min_offs and last. */ @@ -1707,6 +1707,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i, here->e_value_size = cpu_to_le32(i->value_len); } +update_hash: if (i->value) { __le32 hash = 0; @@ -1725,7 +1726,8 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i, here->e_name_len, &crc32c_hash, 1); } else if (is_block) { - __le32 *value = s->base + min_offs - new_size; + __le32 *value = s->base + le16_to_cpu( + here->e_value_offs); hash = ext4_xattr_hash_entry(here->e_name, here->e_name_len, value, |