[PATCH 2.6.7-rc3] nr_free_files ?

From: FabF
Date: Tue Jun 08 2004 - 16:07:26 EST


Andrew,

Here's a patch removing nr_free_files.This one is unused in the whole
tree + file-nr was tri-int exposed in /proc.This patch gives file-nr
simple integer as file-max.Could you apply if this doesn't break
historical features ?

Regards,
FabF
diff -Naur orig/include/linux/fs.h edited/include/linux/fs.h
--- orig/include/linux/fs.h 2004-06-08 00:04:43.000000000 +0200
+++ edited/include/linux/fs.h 2004-06-08 22:50:36.000000000 +0200
@@ -49,7 +49,6 @@
/* And dynamically-tunable limits and defaults: */
struct files_stat_struct {
int nr_files; /* read only */
- int nr_free_files; /* read only */
int max_files; /* tunable */
};
extern struct files_stat_struct files_stat;
diff -Naur orig/kernel/sysctl.c edited/kernel/sysctl.c
--- orig/kernel/sysctl.c 2004-06-08 00:04:44.000000000 +0200
+++ edited/kernel/sysctl.c 2004-06-08 22:53:09.000000000 +0200
@@ -822,8 +822,8 @@
{
.ctl_name = FS_NRFILE,
.procname = "file-nr",
- .data = &files_stat,
- .maxlen = 3*sizeof(int),
+ .data = &files_stat.nr_files,
+ .maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
},