patch-2.3.25 linux/fs/file.c
Next file: linux/fs/filesystems.c
Previous file: linux/fs/fat/file.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Sat Oct 30 11:10:31 1999
-  Orig file: 
v2.3.24/linux/fs/file.c
-  Orig date: 
Fri Oct 22 13:21:52 1999
diff -u --recursive --new-file v2.3.24/linux/fs/file.c linux/fs/file.c
@@ -64,7 +64,7 @@
 
 	
 	error = -EMFILE;
-	if (files->max_fds >= NR_OPEN || nr > NR_OPEN)
+	if (files->max_fds >= NR_OPEN || nr >= NR_OPEN)
 		goto out;
 
 	nfds = files->max_fds;
@@ -88,7 +88,7 @@
 			if (nfds > NR_OPEN)
 				nfds = NR_OPEN;
 		}
-	} while (nfds < nr);
+	} while (nfds <= nr);
 
 	error = -ENOMEM;
 	new_fds = alloc_fd_array(nfds);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)