===================================================================
@@ -1691,14 +1691,13 @@ failed:
get_random_bytes(result, ic->tag_size);
}
-static void integrity_recheck(struct dm_integrity_io *dio)
+static noinline void integrity_recheck(struct dm_integrity_io *dio, char *checksum)
{
struct bio *bio = dm_bio_from_per_bio_data(dio, sizeof(struct dm_integrity_io));
struct dm_integrity_c *ic = dio->ic;
struct bvec_iter iter;
struct bio_vec bv;
sector_t sector, logical_sector, area, offset;
- char checksum_onstack[max_t(size_t, HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
struct page *page;
void *buffer;
@@ -1735,8 +1734,8 @@ static void integrity_recheck(struct dm_
}
integrity_sector_checksum(ic, logical_sector, buffer,
- checksum_onstack);
- r = dm_integrity_rw_tag(ic, checksum_onstack, &dio->metadata_block,
+ checksum);
+ r = dm_integrity_rw_tag(ic, checksum, &dio->metadata_block,
&dio->metadata_offset, ic->tag_size, TAG_CMP);
if (r) {
if (r > 0) {
@@ -1851,7 +1850,7 @@ again:
checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
if (unlikely(r)) {
if (r > 0) {
- integrity_recheck(dio);
+ integrity_recheck(dio, checksums);
goto skip_io;
}
if (likely(checksums != checksums_onstack))
===================================================================
@@ -491,8 +491,8 @@ static int verity_recheck_copy(struct dm
return 0;
}
-static int verity_recheck(struct dm_verity *v, struct dm_verity_io *io,
- struct bvec_iter start, sector_t cur_block)
+static noinline int verity_recheck(struct dm_verity *v, struct dm_verity_io *io,
+ struct bvec_iter start, sector_t cur_block)
{
struct page *page;
void *buffer;