-
Prasanna Meda authored
expand_files() cleanup: Make expand_files() common code for fork.c:fork/copy_files(), open.c:open/get_unused_fd() and fcntl.c:dup/locate_fd(). expand_files() does both expand_fd_array and expand_fd_set based on the need. This is used in dup(). open() and fork() duplicates the work of expand files. At all places we check for expanding fd array, we also check for expanding fdset. There is no need of checking and calling them seperately. This change also moves the expand_files to file.c from fcntl.c, and makes the expand_fd_array and expand_fd_set local to that file. Signed-off-by: Prasanna Meda <pmeda@akamai.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
46c4ad2c