Linux defines PATH_MAX in <linux/limits.h> and code that just wants PATH_MAX to format a path may not be interested in all the other stuff defined in fs.h. Thus move PATH_MAX to <linux/limits.h> instead. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- include/fs.h | 3 +-- include/linux/limits.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fs.h b/include/fs.h index c64e78b38cf9..a61982e59ade 100644 --- a/include/fs.h +++ b/include/fs.h @@ -12,8 +12,7 @@ #include <filetype.h> #include <linux/fs.h> #include <linux/string.h> - -#define PATH_MAX 1024 /* include/linux/limits.h */ +#include <linux/limits.h> struct partition; struct node_d; diff --git a/include/linux/limits.h b/include/linux/limits.h index 17375ef5225e..8baf8494943e 100644 --- a/include/linux/limits.h +++ b/include/linux/limits.h @@ -35,4 +35,6 @@ #define S64_MAX ((s64)(U64_MAX >> 1)) #define S64_MIN ((s64)(-S64_MAX - 1)) +#define PATH_MAX 1024 + #endif /* _LINUX_LIMITS_H */ -- 2.39.2