dm-integrity: don't increment hash_offset twice
Mikulas Patocka
maintainerPATCH 1/1 dm-integrity: don't increment hash_offset twice
hash_offset is already incremented in the loop "for (i = 0; i < to_copy; i++, ts--)". Do not increment it again.
Signed-off-by Mikulas Patocka <[email protected]>
Assisted-by Claude:claude-opus-4.6
Fixes 84597a44a9d8 ("dm-integrity: dm integrity: add optional discard support")
--- drivers/md/dm-integrity.c | 3 --- 1 file changed, 3 deletions(-)
drivers/md/dm-integrity.c +0 -3
@@ -1480,9 +1480,6 @@ thorough_test: *metadata_offset =0 ; } -if (unlikely (!is_power_of_2 (ic->tag_size))) - hash_offset = (hash_offset + to_copy) % ic->tag_size; - total_size -= to_copy; }while (unlikely (total_size));