diff options
author | Tim Chase <[email protected]> | 2018-03-31 17:14:21 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-31 15:14:21 -0700 |
commit | 10adee27ced279c381816e1321226fce5834340c (patch) | |
tree | ec35342a616c1d7711872ff21f25162566d2ca90 /module | |
parent | a2c2ed1bd4c3dc6d52b6058b9c74245cad2ae331 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tim Chase <[email protected]>
Closes #7375
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/arc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 893e42d31..40a93107d 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -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. */ if (HDR_HAS_RABD(hdr) && asize != psize) { - ASSERT3U(size, ==, psize); + ASSERT3U(asize, >=, psize); to_write = abd_alloc_for_io(asize, ismd); - abd_copy(to_write, hdr->b_crypt_hdr.b_rabd, size); - if (size != asize) - abd_zero_off(to_write, size, asize - size); + abd_copy(to_write, hdr->b_crypt_hdr.b_rabd, psize); + if (psize != asize) + abd_zero_off(to_write, psize, asize - psize); goto out; } |