mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
fs: Make file-nr output the total allocated file handles
Make file-nr output the total allocated file handles, not per-cpu cache number, it's more precise, and not in hot path Signed-off-by: Li RongQing <lirongqing@baidu.com> Link: https://lore.kernel.org/20250410112117.2851-1-lirongqing@baidu.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
6b24a702ec
commit
ef181fa11d
|
@ -102,7 +102,7 @@ EXPORT_SYMBOL_GPL(get_max_files);
|
||||||
static int proc_nr_files(const struct ctl_table *table, int write, void *buffer,
|
static int proc_nr_files(const struct ctl_table *table, int write, void *buffer,
|
||||||
size_t *lenp, loff_t *ppos)
|
size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
files_stat.nr_files = get_nr_files();
|
files_stat.nr_files = percpu_counter_sum_positive(&nr_files);
|
||||||
return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
|
return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user