From 6fa47d6de4036d5e25ce3f8d053949a148fe7476 Mon Sep 17 00:00:00 2001 From: Lingao Meng Date: Fri, 17 Jul 2026 16:01:25 +0800 Subject: [PATCH] fs/hostfs: Use configured path length hostfs keeps its own HOSTFS_MAX_PATH wrapper for internal buffers, but it should not hard-code a path length separate from the system path configuration. Define HOSTFS_MAX_PATH from PATH_MAX instead. PATH_MAX is backed by CONFIG_PATH_MAX, whose default remains 256, so the default hostfs behavior does not change while configurations that choose a larger path limit are honored consistently. Assisted-by: Claude:Claude-Fable-5 Signed-off-by: Lingao Meng --- fs/hostfs/hostfs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h index 096be6ae75a..05486aed7cf 100644 --- a/fs/hostfs/hostfs.h +++ b/fs/hostfs/hostfs.h @@ -29,6 +29,7 @@ #include +#include #include #include #include @@ -37,7 +38,7 @@ * Pre-processor Definitions ****************************************************************************/ -#define HOSTFS_MAX_PATH 256 +#define HOSTFS_MAX_PATH PATH_MAX /**************************************************************************** * Public Types