mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 12:40:53 +07:00
Fix a clang build regression and an potential xattr corruption bug.
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAlmdAHoACgkQ8vlZVpUN gaNVsgf/SRn6HaOpX7BdrtkXqjV8VvLZsDmsZPkhchdmTxMpIFJNf16/sg0hqdyJ wcTx3y+BkBSjBXLtqK+hslVyg4pUjSBWWZyZ9Dtyi5+B92CJJJBdaHIpcdvd3Ek1 J/HPQjqcPXL43Cg5SQ0/KgVMhCze9I4bEbNm2evC18bC15hZAVP0FK1hT3FNpyIB fhOu9FZdnzlcBlnLdfTqgIEPaHzc6zcJnqpSbkT0InjiJf5cxDionhoaBzUh9Jzg bKvkFRDTDWDrBcYStuHwgpELmVVYJGbwjzMVOAcmeCiSJqNbU1/Ym5t3e3rflKmi 6YEyDhK43iZGiR4/QUffrCxEIzfqrA== =dOeQ -----END PGP SIGNATURE----- Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix a clang build regression and an potential xattr corruption bug" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: add missing xattr hash update ext4: fix clang build regression
This commit is contained in:
commit
98b9f8a454
@ -2300,7 +2300,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
|
||||
EXT4_MAX_BLOCK_LOG_SIZE);
|
||||
struct sg {
|
||||
struct ext4_group_info info;
|
||||
ext4_grpblk_t counters[blocksize_bits + 2];
|
||||
ext4_grpblk_t counters[EXT4_MAX_BLOCK_LOG_SIZE + 2];
|
||||
} sg;
|
||||
|
||||
group--;
|
||||
@ -2309,6 +2309,9 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
|
||||
" 2^0 2^1 2^2 2^3 2^4 2^5 2^6 "
|
||||
" 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n");
|
||||
|
||||
i = (blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
|
||||
sizeof(struct ext4_group_info);
|
||||
|
||||
grinfo = ext4_get_group_info(sb, group);
|
||||
/* Load the group info in memory only if not already loaded. */
|
||||
if (unlikely(EXT4_MB_GRP_NEED_INIT(grinfo))) {
|
||||
@ -2320,7 +2323,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
|
||||
buddy_loaded = 1;
|
||||
}
|
||||
|
||||
memcpy(&sg, ext4_get_group_info(sb, group), sizeof(sg));
|
||||
memcpy(&sg, ext4_get_group_info(sb, group), i);
|
||||
|
||||
if (buddy_loaded)
|
||||
ext4_mb_unload_buddy(&e4b);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user