f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs
authorChao Yu <yuchao0@huawei.com>
Tue, 18 May 2021 01:57:54 +0000 (09:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:50 +0000 (16:05 +0200)
commit43cefd126450060ff17daf69d02f50994ef70cfe
tree0b8caed2308f6187263fe837d7997f0aff0b5b4c
parent74569cb9ed7bc60e395927f55d3dc3be143a0164
f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs

[ Upstream commit 0dd571785d61528d62cdd8aa49d76bc6085152fe ]

As marcosfrm reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=213089

Initramfs generators rely on "pre" softdeps (and "depends") to include
additional required modules.

F2FS does not declare "pre: crc32" softdep. Then every generator (dracut,
mkinitcpio...) has to maintain a hardcoded list for this purpose.

Hence let's use MODULE_SOFTDEP("pre: crc32") in f2fs code.

Fixes: 43b6573bac95 ("f2fs: use cryptoapi crc32 functions")
Reported-by: marcosfrm <marcosfrm@gmail.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/super.c