[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_D3D0CC5A7E63CF04557ED42E411D9379E908@qq.com>
Date: Sun, 25 Feb 2024 12:05:36 +0800
From: wenyang.linux@...mail.com
To: Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Joel Granados <j.granados@...sung.com>,
Christian Brauner <brauner@...nel.org>,
davem@...emloft.net,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Wen Yang <wenyang.linux@...mail.com>,
Jan Kara <jack@...e.cz>,
"Darrick J. Wong" <djwong@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 6/8] epoll: delete these duplicate static variables long_zero and long_max
From: Wen Yang <wenyang.linux@...mail.com>
Since these static variables (long_zero and long_max) are only used for
boundary checks and will not be changed, remove it and use the ones in
our shared const array.
Signed-off-by: Wen Yang <wenyang.linux@...mail.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>
Cc: Kees Cook <keescook@...omium.org>
Cc: Joel Granados <j.granados@...sung.com>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Jan Kara <jack@...e.cz>
Cc: "Darrick J. Wong" <djwong@...nel.org>
Cc: linux-kernel@...r.kernel.org
---
fs/eventpoll.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 3534d36a1474..22864d6de04f 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -309,9 +309,6 @@ static void unlist_file(struct epitems_head *head)
#include <linux/sysctl.h>
-static long long_zero;
-static long long_max = LONG_MAX;
-
static struct ctl_table epoll_table[] = {
{
.procname = "max_user_watches",
@@ -319,8 +316,8 @@ static struct ctl_table epoll_table[] = {
.maxlen = sizeof(max_user_watches),
.mode = 0644,
.proc_handler = proc_doulongvec_minmax,
- .extra1 = &long_zero,
- .extra2 = &long_max,
+ .extra1 = SYSCTL_LONG_ZERO,
+ .extra2 = SYSCTL_LONG_MAX,
},
};
--
2.25.1
Powered by blists - more mailing lists