patch-1.3.57 linux/fs/inode.c
Next file: linux/fs/msdos/inode.c
Previous file: linux/fs/file_table.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Wed Jan 10 09:27:39 1996
- Orig file:
v1.3.56/linux/fs/inode.c
- Orig date:
Thu Jan 4 21:54:56 1996
diff -u --recursive --new-file v1.3.56/linux/fs/inode.c linux/fs/inode.c
@@ -19,7 +19,9 @@
static struct inode * first_inode;
static struct wait_queue * inode_wait = NULL;
-static int nr_inodes = 0, nr_free_inodes = 0;
+/* Keep these next two contiguous in memory for sysctl.c */
+int nr_inodes = 0, nr_free_inodes = 0;
+int max_inodes = NR_INODE;
static inline int const hashfn(kdev_t dev, unsigned int i)
{
@@ -455,7 +457,7 @@
unsigned long badness = 1000;
int i;
- if (nr_inodes < NR_INODE && nr_free_inodes < (nr_inodes >> 1))
+ if (nr_inodes < max_inodes && nr_free_inodes < (nr_inodes >> 1))
grow_inodes();
repeat:
inode = first_inode;
@@ -471,7 +473,7 @@
}
}
if (badness)
- if (nr_inodes < NR_INODE) {
+ if (nr_inodes < max_inodes) {
if (grow_inodes() == 0)
goto repeat;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this