[RFC PATCH 32/39] sysctl: remove obsolete nr_open bound variables
From: wen . yang
Date: Wed Oct 28 2026 - 12:42:45 EST
From: Wen Yang <wen.yang@xxxxxxxxx>
Remove nr_open bound variables and declarations now that limits are inline.
Suggested-by: Joel Granados <joel.granados@xxxxxxxxxx>
Signed-off-by: Wen Yang <wen.yang@xxxxxxxxx>
---
fs/file.c | 5 -----
include/linux/file.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/fs/file.c b/fs/file.c
index 4cd40dfa6129..25fc2de96e9b 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -94,11 +94,6 @@ bool __file_ref_put(file_ref_t *ref, unsigned long cnt)
EXPORT_SYMBOL_GPL(__file_ref_put);
unsigned int sysctl_nr_open __read_mostly = 1024*1024;
-unsigned int sysctl_nr_open_min = BITS_PER_LONG;
-/* our min() is unusable in constant expressions ;-/ */
-#define __const_min(x, y) ((x) < (y) ? (x) : (y))
-unsigned int sysctl_nr_open_max =
- __const_min(INT_MAX, ~(size_t)0/sizeof(void *)) & -BITS_PER_LONG;
static void __free_fdtable(struct fdtable *fdt)
{
diff --git a/include/linux/file.h b/include/linux/file.h
index 41c3c0be1064..634f1770e9a6 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -126,8 +126,6 @@ int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags);
extern void flush_delayed_fput(void);
extern void __fput_sync(struct file *);
-extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
-
/*
* fd_prepare: Combined fd + file allocation cleanup class.
* @fd: Allocated fd
--
2.25.1