]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hostfs: Fix only passing host root in boot stage with new mount
authorHongbo Li <lihongbo22@huawei.com>
Sat, 11 Oct 2025 09:22:35 +0000 (09:22 +0000)
committerChristian Brauner <brauner@kernel.org>
Tue, 21 Oct 2025 12:22:42 +0000 (14:22 +0200)
commit2c2b67af5f5f77fc68261a137ad65dcfb8e52506
tree323021ed457bfd2d90c7004da48944211cbdfc49
parent0778ac7df5137d5041783fadfc201f8fd55a1d9b
hostfs: Fix only passing host root in boot stage with new mount

In the old mount proceedure, hostfs could only pass root directory during
boot. This is because it constructed the root directory using the @root_ino
event without any mount options. However, when using it with the new mount
API, this step is no longer triggered. As a result, if users mounts without
specifying any mount options, the @host_root_path remains uninitialized. To
prevent this issue, the @host_root_path should be initialized at the time
of allocation.

Reported-by: Geoffrey Thorpe <geoff@geoffthorpe.net>
Closes: https://lore.kernel.org/all/643333a0-f434-42fb-82ac-d25a0b56f3b7@geoffthorpe.net/
Fixes: cd140ce9f611 ("hostfs: convert hostfs to use the new mount API")
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20251011092235.29880-1-lihongbo22@huawei.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/hostfs/hostfs_kern.c