On Sat Aug 1, 2026 at 10:52 AM EDT, Usama Arif wrote: > On Fri, 31 Jul 2026 22:13:27 -0400 Zi Yan <[email protected]> wrote: > >> The point to a plaintext folio is stored in page->private and cannot be >> NULL, making PG_private redundant. > > s/point to/pointer to/ > > > And fscrypt_free_bounce_page() NULLs it, so that needs to be corrected.
Will change it to: The pointer to a plaintext folio is stored in bounce_page->private and cannot be NULL until the bounce_page is freed, making PG_private redundant. > > >> It prepares for a future commit that remove PG_private. >> >> No funtional change intended. >> >> Assisted-by: Claude:claude-opus-4-8 >> Assisted-by: Codex:gpt-5 >> Signed-off-by: Zi Yan <[email protected]> >> To: Eric Biggers <[email protected]> >> To: "Theodore Y. Ts'o" <[email protected]> >> To: Jaegeuk Kim <[email protected]> >> Cc: [email protected] >> Cc: [email protected] >> --- >> fs/crypto/crypto.c | 2 -- >> 1 file changed, 2 deletions(-) > > Nothing in fscrypt or its users tests PG_private on a bounce page, so > this looks right to me. The commit message needs to be corrected but code > looks correct. > > Feel free to add: > > Acked-by: Usama Arif <[email protected]> Thanks. > > >> >> diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c >> index 570a2231c945a..c8a98dd94650f 100644 >> --- a/fs/crypto/crypto.c >> +++ b/fs/crypto/crypto.c >> @@ -73,7 +73,6 @@ void fscrypt_free_bounce_page(struct page *bounce_page) >> if (!bounce_page) >> return; >> set_page_private(bounce_page, (unsigned long)NULL); >> - ClearPagePrivate(bounce_page); >> mempool_free(bounce_page, fscrypt_bounce_page_pool); >> } >> EXPORT_SYMBOL(fscrypt_free_bounce_page); >> @@ -202,7 +201,6 @@ struct page *fscrypt_encrypt_pagecache_blocks(struct >> folio *folio, >> return ERR_PTR(err); >> } >> } >> - SetPagePrivate(ciphertext_page); >> set_page_private(ciphertext_page, (unsigned long)folio); >> return ciphertext_page; >> } >> >> -- >> 2.53.0 >> >> -- Best Regards, Yan, Zi

