Fix compilation

This commit is contained in:
toninov 2025-10-26 14:43:17 +01:00
parent 45c1c919fd
commit 2e96ec2374
No known key found for this signature in database

View file

@ -143,7 +143,7 @@ static int crypt_blocks_generic(struct crypto_sync_skcipher *tfm,
next_sg_dst = map_sg(sg_dst, dst, dst_iter);
}
err = crypt_sg(tfm, sg_src, *p_sg_dst, pblk_num, rw);
err = crypt_block_sg(tfm, sg_src, *p_sg_dst, pblk_num, rw);
if (err)
goto out;
}
@ -157,12 +157,6 @@ out:
}
int sflite_crypt_bio(struct crypto_sync_skcipher *tfm, struct bio *src_bio,
struct bio *dst_bio, u64 num_blocks, u64 first_pblk_num, int rw)
{
}
/* Encrypt-decrypt a single block (memory buffer is a page) */
int sflite_crypt_block_page(struct crypto_sync_skcipher *tfm, struct page *src_page,
struct page *dst_page, u64 pblk_num, int rw)
@ -183,7 +177,7 @@ int sflite_crypt_block_page(struct crypto_sync_skcipher *tfm, struct page *src_p
sg_set_page(&dst, dst_page, SFLITE_BLOCK_SIZE, 0);
}
return crypt_sg(tfm, &src, p_dst, pblk_num, rw);
return crypt_block_sg(tfm, &src, p_dst, pblk_num, rw);
}
@ -193,7 +187,7 @@ int sflite_crypt_block_page(struct crypto_sync_skcipher *tfm, struct page *src_p
*---------------------------------------
*/
unsigned count_sgs_from_buf(void *buf, sector_t nblocks)
static unsigned count_sgs_from_buf(void *buf, sector_t nblocks)
{
/* For simplicity, enforce that the offset is aligned to the block size
* so that all blocks require the same number of scatterlists.
@ -203,7 +197,7 @@ unsigned count_sgs_from_buf(void *buf, sector_t nblocks)
return nblocks * DIV_ROUND_UP(SFLITE_BLOCK_SIZE, PAGE_SIZE);
}
struct scatterlist* map_sg_from_buf(struct scatterlist *sg, void *buf, void *iter)
static struct scatterlist* map_sg_from_buf(struct scatterlist *sg, void *buf, void *iter)
{
unsigned long *iter_off = iter;
bool is_vmalloc = is_vmalloc_addr(buf);