diff -urN linux-2.2.10/arch/m68k/kernel/process.c linux-2.2.10-fd/arch/m68k/kernel/process.c --- linux-2.2.10/arch/m68k/kernel/process.c Tue Jul 13 00:33:09 1999 +++ linux-2.2.10-fd/arch/m68k/kernel/process.c Mon Jul 19 02:53:14 1999 @@ -40,7 +40,6 @@ */ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct file * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -urN linux-2.2.10/arch/mips/kernel/init_task.c linux-2.2.10-fd/arch/mips/kernel/init_task.c --- linux-2.2.10/arch/mips/kernel/init_task.c Mon Jan 18 02:29:09 1999 +++ linux-2.2.10-fd/arch/mips/kernel/init_task.c Mon Jul 19 02:53:13 1999 @@ -6,7 +6,6 @@ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct files * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -urN linux-2.2.10/arch/ppc/kernel/process.c linux-2.2.10-fd/arch/ppc/kernel/process.c --- linux-2.2.10/arch/ppc/kernel/process.c Tue Jul 13 00:33:09 1999 +++ linux-2.2.10-fd/arch/ppc/kernel/process.c Mon Jul 19 02:53:14 1999 @@ -48,7 +48,6 @@ struct task_struct *last_task_used_math = NULL; static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct file * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -urN linux-2.2.10/arch/ppc/kernel/syscalls.c linux-2.2.10-fd/arch/ppc/kernel/syscalls.c --- linux-2.2.10/arch/ppc/kernel/syscalls.c Tue Jul 13 00:33:20 1999 +++ linux-2.2.10-fd/arch/ppc/kernel/syscalls.c Mon Jul 19 02:53:14 1999 @@ -201,7 +201,8 @@ lock_kernel(); if (!(flags & MAP_ANONYMOUS)) { - if (fd >= NR_OPEN || !(file = current->files->fd[fd])) + if (fd >= current->files->max_fds || + !(file = current->files->fd[fd])) goto out; } diff -urN linux-2.2.10/arch/sparc/kernel/init_task.c linux-2.2.10-fd/arch/sparc/kernel/init_task.c --- linux-2.2.10/arch/sparc/kernel/init_task.c Mon Jan 18 02:29:08 1999 +++ linux-2.2.10-fd/arch/sparc/kernel/init_task.c Mon Jul 19 02:53:13 1999 @@ -6,7 +6,6 @@ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct file * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -urN linux-2.2.10/arch/sparc64/kernel/init_task.c linux-2.2.10-fd/arch/sparc64/kernel/init_task.c --- linux-2.2.10/arch/sparc64/kernel/init_task.c Mon Jan 18 02:29:22 1999 +++ linux-2.2.10-fd/arch/sparc64/kernel/init_task.c Mon Jul 19 02:53:14 1999 @@ -6,7 +6,6 @@ static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; -static struct file * init_fd_array[NR_OPEN] = { NULL, }; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; struct mm_struct init_mm = INIT_MM; diff -urN linux-2.2.10/arch/sparc64/solaris/timod.c linux-2.2.10-fd/arch/sparc64/solaris/timod.c --- linux-2.2.10/arch/sparc64/solaris/timod.c Mon Jan 18 02:29:23 1999 +++ linux-2.2.10-fd/arch/sparc64/solaris/timod.c Mon Jul 19 02:53:14 1999 @@ -866,7 +866,7 @@ SOLD("entry"); lock_kernel(); - if(fd >= NR_OPEN) goto out; + if(fd >= current->files->max_fds) goto out; filp = current->files->fd[fd]; if(!filp) goto out; @@ -933,7 +933,7 @@ SOLD("entry"); lock_kernel(); - if(fd >= NR_OPEN) goto out; + if(fd >= current->files->max_fds) goto out; filp = current->files->fd[fd]; if(!filp) goto out; diff -urN linux-2.2.10/include/asm-arm/resource.h linux-2.2.10-fd/include/asm-arm/resource.h --- linux-2.2.10/include/asm-arm/resource.h Mon Jan 18 02:27:40 1999 +++ linux-2.2.10-fd/include/asm-arm/resource.h Mon Jul 19 02:53:13 1999 @@ -29,7 +29,7 @@ { 0, LONG_MAX }, \ { LONG_MAX, LONG_MAX }, \ { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \ - { NR_OPEN, NR_OPEN }, \ + { INR_OPEN, INR_OPEN }, \ { LONG_MAX, LONG_MAX }, \ { LONG_MAX, LONG_MAX }, \ } diff -urN linux-2.2.10/include/asm-m68k/resource.h linux-2.2.10-fd/include/asm-m68k/resource.h --- linux-2.2.10/include/asm-m68k/resource.h Mon Jan 18 02:27:23 1999 +++ linux-2.2.10-fd/include/asm-m68k/resource.h Mon Jul 19 02:53:13 1999 @@ -29,7 +29,7 @@ { 0, LONG_MAX}, \ {LONG_MAX, LONG_MAX}, \ {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ - {NR_OPEN, NR_OPEN}, \ + {INR_OPEN, INR_OPEN}, \ {LONG_MAX, LONG_MAX}, \ {LONG_MAX, LONG_MAX} \ } diff -urN linux-2.2.10/include/asm-mips/resource.h linux-2.2.10-fd/include/asm-mips/resource.h --- linux-2.2.10/include/asm-mips/resource.h Mon Jan 18 02:27:19 1999 +++ linux-2.2.10-fd/include/asm-mips/resource.h Mon Jul 19 02:53:13 1999 @@ -35,7 +35,7 @@ {LONG_MAX, LONG_MAX}, \ {_STK_LIM, _STK_LIM}, \ { 0, LONG_MAX}, \ - {NR_OPEN, NR_OPEN}, \ + {INR_OPEN, INR_OPEN}, \ {LONG_MAX, LONG_MAX}, \ {LONG_MAX, LONG_MAX}, \ {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ diff -urN linux-2.2.10/include/asm-ppc/resource.h linux-2.2.10-fd/include/asm-ppc/resource.h --- linux-2.2.10/include/asm-ppc/resource.h Mon Jan 18 02:27:33 1999 +++ linux-2.2.10-fd/include/asm-ppc/resource.h Mon Jul 19 02:53:13 1999 @@ -25,7 +25,7 @@ { 0, LONG_MAX}, /* RLIMIT_CORE */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_RSS */ \ {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, /* RLIMIT_NPROC */ \ - { NR_OPEN, NR_OPEN}, /* RLIMIT_NOFILE */ \ + {INR_OPEN, INR_OPEN}, /* RLIMIT_NOFILE */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_MEMLOCK */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_AS */ \ } diff -urN linux-2.2.10/include/asm-sparc/resource.h linux-2.2.10-fd/include/asm-sparc/resource.h --- linux-2.2.10/include/asm-sparc/resource.h Wed Mar 24 01:50:57 1999 +++ linux-2.2.10-fd/include/asm-sparc/resource.h Mon Jul 19 02:53:13 1999 @@ -31,7 +31,7 @@ {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX}, \ {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX}, \ { 0, LONG_MAX}, {LONG_MAX, LONG_MAX}, \ - {NR_OPEN, NR_OPEN}, {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ + {INR_OPEN, INR_OPEN}, {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX} \ } diff -urN linux-2.2.10/include/asm-sparc64/resource.h linux-2.2.10-fd/include/asm-sparc64/resource.h --- linux-2.2.10/include/asm-sparc64/resource.h Wed Mar 24 01:51:21 1999 +++ linux-2.2.10-fd/include/asm-sparc64/resource.h Mon Jul 19 02:53:13 1999 @@ -30,7 +30,7 @@ {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX}, \ {LONG_MAX, LONG_MAX}, {_STK_LIM, LONG_MAX}, \ { 0, LONG_MAX}, {LONG_MAX, LONG_MAX}, \ - {NR_OPEN, NR_OPEN}, {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ + {INR_OPEN, INR_OPEN}, {MAX_TASKS_PER_USER, MAX_TASKS_PER_USER}, \ {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX} \ }