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

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)