fscrypt: Simplify handling of errors during initcall

Since CONFIG_FS_ENCRYPTION is a bool, not a tristate, fs/crypto/ can
only be builtin or absent entirely; it can't be a loadable module.
Therefore, the error code that gets returned from the fscrypt_init()
initcall is never used.  If any part of the initcall does fail, which
should never happen, the kernel will be left in a bad state.

Following the usual convention for builtin code, just panic the kernel
if any of part of the initcall fails.  This simplifies the code.

This closely mirrors commit e77000ccc5 ("fsverity: simplify handling
of errors during initcall").

Link: https://patch.msgid.link/20260619000030.166851-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
Eric Biggers 2026-06-18 17:00:30 -07:00
commit 928a1e6ba3
3 changed files with 13 additions and 34 deletions