@@ -392,7 +392,7 @@ static int crypt_extent(struct ecryptfs_crypt_stat *crypt_stat,
392
392
393
393
/**
394
394
* ecryptfs_encrypt_page
395
- * @page: Page mapped from the eCryptfs inode for the file; contains
395
+ * @folio: Folio mapped from the eCryptfs inode for the file; contains
396
396
* decrypted content that needs to be encrypted (to a temporary
397
397
* page; not in place) and written out to the lower file
398
398
*
@@ -406,7 +406,7 @@ static int crypt_extent(struct ecryptfs_crypt_stat *crypt_stat,
406
406
*
407
407
* Returns zero on success; negative on error
408
408
*/
409
- int ecryptfs_encrypt_page (struct page * page )
409
+ int ecryptfs_encrypt_page (struct folio * folio )
410
410
{
411
411
struct inode * ecryptfs_inode ;
412
412
struct ecryptfs_crypt_stat * crypt_stat ;
@@ -416,7 +416,7 @@ int ecryptfs_encrypt_page(struct page *page)
416
416
loff_t lower_offset ;
417
417
int rc = 0 ;
418
418
419
- ecryptfs_inode = page -> mapping -> host ;
419
+ ecryptfs_inode = folio -> mapping -> host ;
420
420
crypt_stat =
421
421
& (ecryptfs_inode_to_private (ecryptfs_inode )-> crypt_stat );
422
422
BUG_ON (!(crypt_stat -> flags & ECRYPTFS_ENCRYPTED ));
@@ -431,16 +431,16 @@ int ecryptfs_encrypt_page(struct page *page)
431
431
for (extent_offset = 0 ;
432
432
extent_offset < (PAGE_SIZE / crypt_stat -> extent_size );
433
433
extent_offset ++ ) {
434
- rc = crypt_extent (crypt_stat , enc_extent_page , page ,
435
- extent_offset , ENCRYPT );
434
+ rc = crypt_extent (crypt_stat , enc_extent_page ,
435
+ folio_page ( folio , 0 ), extent_offset , ENCRYPT );
436
436
if (rc ) {
437
437
printk (KERN_ERR "%s: Error encrypting extent; "
438
438
"rc = [%d]\n" , __func__ , rc );
439
439
goto out ;
440
440
}
441
441
}
442
442
443
- lower_offset = lower_offset_for_page (crypt_stat , page );
443
+ lower_offset = lower_offset_for_page (crypt_stat , & folio -> page );
444
444
enc_extent_virt = kmap_local_page (enc_extent_page );
445
445
rc = ecryptfs_write_lower (ecryptfs_inode , enc_extent_virt , lower_offset ,
446
446
PAGE_SIZE );
0 commit comments