patch-2.3.26 linux/fs/file.c

Next file: linux/fs/hfs/file.c
Previous file: linux/fs/fat/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.25/linux/fs/file.c linux/fs/file.c
@@ -175,7 +175,7 @@
 	int error, nfds = 0;
 
 	error = -EMFILE;
-	if (files->max_fdset >= NR_OPEN || nr > NR_OPEN)
+	if (files->max_fdset >= NR_OPEN || nr >= NR_OPEN)
 		goto out;
 
 	nfds = files->max_fdset;
@@ -190,7 +190,7 @@
 			if (nfds > NR_OPEN)
 				nfds = NR_OPEN;
 		}
-	} while (nfds < nr);
+	} while (nfds <= nr);
 
 	error = -ENOMEM;
 	new_openset = alloc_fdset(nfds);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)