mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 23:57:36 -04:00
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 <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4.6
Fixes: 84597a44a9 ("dm-integrity: dm integrity: add optional discard support")
Cc: stable@vger.kernel.org
This commit is contained in:
@@ -1480,9 +1480,6 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se
|
||||
*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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user