Message ID | 20241123181144.183326-1-alexjlzheng@tencent.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Maintain the relative size of fs.file-max and fs.nr_open | expand |
diff --git a/fs/file_table.c b/fs/file_table.c index 502b81f614d9..db3d3a9cb421 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -33,7 +33,7 @@ #include "internal.h" /* sysctl tunables... */ -static struct files_stat_struct files_stat = { +struct files_stat_struct files_stat = { .max_files = NR_FILE }; diff --git a/include/linux/fs.h b/include/linux/fs.h index 7e29433c5ecc..931076faadde 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -89,6 +89,7 @@ extern void __init files_maxfiles_init(void); extern unsigned long get_max_files(void); extern unsigned int sysctl_nr_open; +extern struct files_stat_struct files_stat; typedef __kernel_rwf_t rwf_t;
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> --- fs/file_table.c | 2 +- include/linux/fs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)