linux-stable/init
Christian Brauner 386dc41cf5
init: flush async file closing
When unpacking the initramfs or when mounting block devices we need to
ensure that any delayed fput() finished to prevent spurious errors.
The init process can be a proper kernel thread or a user mode helper.
In the latter case PF_KTHREAD isn't set. So we need to do both
flush_delayed_work() and task_work_run().

Since we'll port block device opening and closing to regular file open
and closing we need to ensure the same as for the initramfs. So just
make that a little helper.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Link: https://lore.kernel.org/r/CA+G9fYttTwsbFuVq10igbSvP5xC6bf_XijM=mpUqrJV=uvUirQ@mail.gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-02-08 18:41:03 +01:00
..
.gitignore kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
Kconfig init/Kconfig: move more items into the EXPERT menu 2023-12-20 15:02:58 -08:00
Makefile x86/retpoline: Make sure there are no unconverted return thunks due to KCSAN 2023-10-20 13:02:23 +02:00
build-version kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
calibrate.c
do_mounts.c init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts.h init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts_initrd.c init: pass root_device_name explicitly 2023-06-05 10:55:20 -06:00
do_mounts_rd.c init: add an init_unlink helper 2020-07-31 08:17:52 +02:00
init_task.c header cleanups for 6.8 2024-01-10 16:43:55 -08:00
initramfs.c init: flush async file closing 2024-02-08 18:41:03 +01:00
main.c proc: sysctl: prevent aliased sysctls from getting passed to init 2023-11-01 12:10:02 -07:00
noinitramfs.c init: move usermodehelper_enable() to populate_rootfs() 2021-09-08 11:50:27 -07:00
version-timestamp.c init/version-timestamp.c: remove unneeded #include <linux/version.h> 2023-01-09 07:34:38 +09:00
version.c init/version.c: Replace strlcpy with strscpy 2023-09-22 09:50:56 -07:00