From: Jinliang Zheng Date: Sun, 24 Nov 2024 03:46:36 +0000 (+0800) Subject: fs: fix proc_handler for sysctl_nr_open X-Git-Tag: v6.14-rc1~216^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d727935cad9f6f52c8d184968f9720fdc966c669;p=thirdparty%2Fkernel%2Flinux.git fs: fix proc_handler for sysctl_nr_open Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle sysctl_nr_open, because its data type is unsigned int, not int. Fixes: 9b80a184eaad ("fs/file: more unsigned file descriptors") Signed-off-by: Jinliang Zheng Link: https://lore.kernel.org/r/20241124034636.325337-1-alexjlzheng@tencent.com Signed-off-by: Christian Brauner --- diff --git a/fs/file_table.c b/fs/file_table.c index 976736be47cb6..502b81f614d9b 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -128,7 +128,7 @@ static struct ctl_table fs_stat_sysctls[] = { .data = &sysctl_nr_open, .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, + .proc_handler = proc_douintvec_minmax, .extra1 = &sysctl_nr_open_min, .extra2 = &sysctl_nr_open_max, },