summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2026-07-09 21:24:09 +0200
committerMikulas Patocka <mpatocka@redhat.com>2026-07-10 14:39:16 +0200
commitedf025f083854f80032b73a1aad69a3c90db236f (patch)
tree15653558257c68417a463130b3dc4caa927ea4fa /drivers
parent7bb03b2b01b814a9fc14afbfc2cbb2cca5b34750 (diff)
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: 84597a44a9d8 ("dm-integrity: dm integrity: add optional discard support") Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-integrity.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 02b2805ed33a..f5508b1bca11 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -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));