patch-2.2.14 linux/fs/open.c

Next file: linux/fs/proc/array.c
Previous file: linux/fs/ntfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.13/linux/fs/open.c linux/fs/open.c
@@ -712,7 +712,7 @@
 
 	/* Do we need to expand the fdset array? */
 	if (fd >= current->files->max_fdset) {
-		error = expand_fdset(files, 0);
+		error = expand_fdset(files, fd + 1);
 		if (!error)
 			goto repeat;
 		goto out;
@@ -722,7 +722,7 @@
 	 * Check whether we need to expand the fd array.
 	 */
 	if (fd >= files->max_fds) {
-		error = expand_fd_array(files, 0);
+		error = expand_fd_array(files, fd + 1);
 		if (!error)
 			goto repeat;
 		goto out;

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