Skip to content
Snippets Groups Projects
Commit 4069f772 authored by Jinliang Zheng's avatar Jinliang Zheng Committed by Frieder Schrempf
Browse files

fs: fix proc_handler for sysctl_nr_open


[ Upstream commit d727935cad9f6f52c8d184968f9720fdc966c669 ]

Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle
sysctl_nr_open, because its data type is unsigned int, not int.

Fixes: 9b80a184 ("fs/file: more unsigned file descriptors")
Signed-off-by: default avatarJinliang Zheng <alexjlzheng@tencent.com>
Link: https://lore.kernel.org/r/20241124034636.325337-1-alexjlzheng@tencent.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent edba0646
No related branches found
No related tags found
1 merge request!191🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.129)
...@@ -110,7 +110,7 @@ static struct ctl_table fs_stat_sysctls[] = { ...@@ -110,7 +110,7 @@ static struct ctl_table fs_stat_sysctls[] = {
.data = &sysctl_nr_open, .data = &sysctl_nr_open,
.maxlen = sizeof(unsigned int), .maxlen = sizeof(unsigned int),
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_douintvec_minmax,
.extra1 = &sysctl_nr_open_min, .extra1 = &sysctl_nr_open_min,
.extra2 = &sysctl_nr_open_max, .extra2 = &sysctl_nr_open_max,
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment