Re: [PATCH] f2fs: remove unreachable code in f2fs_encrypt_one_page()
Chao Yu <[email protected]> Wed, 4 Mar 2026 15:53:03 +0800
| Newsgroups | org.kernel.vger.linux-fscrypt,net.sourceforge.lists.linux-f2fs-devel |
|---|---|
| Message-ID | <[email protected]> |
On 2026/2/22 04:13, Eric Biggers wrote:
> Since commit 52e7e0d88933 ("fscrypt: Switch to sync_skcipher and
> on-stack requests") eliminated the dynamic allocation of crypto
> requests, the only remaining dynamic memory allocation done by
> fscrypt_encrypt_pagecache_blocks() is the bounce page allocation.
>
> The bounce page is allocated from a mempool. Mempool allocations with
> GFP_NOFS never fail. Therefore, fscrypt_encrypt_pagecache_blocks() can
> no longer return -ENOMEM when passed GFP_NOFS.
>
> Remove the now-unreachable code from f2fs_encrypt_one_page().
>
> Suggested-by: Vlastimil Babka <[email protected]>
> Link: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Eric Biggers <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Thanks,