mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Remove ASSERT() in l2arc_apply_transforms()
The ASSERT was erroneously copied from the next section of code. The buffer's size should be expanded from "psize" to "asize" if necessary. Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Closes #7375
This commit is contained in:
parent
a2c2ed1bd4
commit
10adee27ce
@ -8476,11 +8476,11 @@ l2arc_apply_transforms(spa_t *spa, arc_buf_hdr_t *hdr, uint64_t asize,
|
|||||||
* shared buffer or to reallocate the buffer to match asize.
|
* shared buffer or to reallocate the buffer to match asize.
|
||||||
*/
|
*/
|
||||||
if (HDR_HAS_RABD(hdr) && asize != psize) {
|
if (HDR_HAS_RABD(hdr) && asize != psize) {
|
||||||
ASSERT3U(size, ==, psize);
|
ASSERT3U(asize, >=, psize);
|
||||||
to_write = abd_alloc_for_io(asize, ismd);
|
to_write = abd_alloc_for_io(asize, ismd);
|
||||||
abd_copy(to_write, hdr->b_crypt_hdr.b_rabd, size);
|
abd_copy(to_write, hdr->b_crypt_hdr.b_rabd, psize);
|
||||||
if (size != asize)
|
if (psize != asize)
|
||||||
abd_zero_off(to_write, size, asize - size);
|
abd_zero_off(to_write, psize, asize - psize);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user