I found a way to build and add mod, that is,
dnf install kernel-devel
mkdir /root/mybuild
cd /root/mybuild
# download src
dnf download --source kernel
rpm2cpio kernel-5.14.0-503.40.1.el9_5.src.rpm | cpio -idmv
tar -xvf linux-5.14.0-503.40.1.el9_5.tar.xz
cd linux-5.14.0-503.40.1.el9_5
# make the module
make CONFIG_F2FS_FS=m -C /usr/src/kernels/5.14.0-503.40.1.el9_5.x86_64 M=/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs modules
# insert module: f2fs.ko
insmod ./fs/f2fs/f2fs.ko
# check supported filesystems
cat /proc/filesystems
However, the source-code may have some type of errors, the make is not finished fine, logs:
[root@host linux-5.14.0-503.40.1.el9_5]# make CONFIG_F2FS_FS=m -C /usr/src/kernels/5.14.0-503.40.1.el9_5.x86_64 M=/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs modules
make: Entering directory '/usr/src/kernels/5.14.0-503.40.1.el9_5.x86_64'
CC [M] /root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/dir.o
CC [M] /root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/file.o
CC [M] /root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.o
/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.c: In function ‘f2fs_iget_retry’:
/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.c:565:25: error: implicit declaration of function ‘congestion_wait’ [-Werror=implicit-function-declaration]
565 | congestion_wait(BLK_RW_ASYNC, DEFAULT_IO_TIMEOUT);
| ^~~~~~~~~~~~~~~
/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.c:565:41: error: ‘BLK_RW_ASYNC’ undeclared (first use in this function)
565 | congestion_wait(BLK_RW_ASYNC, DEFAULT_IO_TIMEOUT);
| ^~~~~~~~~~~~
/root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.c:565:41: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:249: /root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs/inode.o] Error 1
make: *** [Makefile:1944: /root/mybuild/linux-5.14.0-503.40.1.el9_5/fs/f2fs] Error 2
make: Leaving directory '/usr/src/kernels/5.14.0-503.40.1.el9_5.x86_64'