]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: remove unreachable code in f2fs_encrypt_one_page()
authorEric Biggers <ebiggers@kernel.org>
Sat, 21 Feb 2026 20:13:16 +0000 (12:13 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 24 Mar 2026 17:20:59 +0000 (17:20 +0000)
commitd69ee59d38a28ba94347aa8c5cf829825f02f243
tree201b561e5a78ccee4b0f5d745aaf66e6e186466c
parente3c33bc767b5512dbfec643a02abf58ce608f3b2
f2fs: remove unreachable code in f2fs_encrypt_one_page()

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 <vbabka@suse.cz>
Link: https://lore.kernel.org/all/d9dc2ee1-283d-4467-ad36-a6a4aa557589@suse.cz/
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c