files->fd[fd] = NULL; 
fdt->fd[fd] = NULL; 
int get_unused_fd(void){	struct files_struct * files = current->files;	int fd, error;  	error = -EMFILE;	spin_lock(&files->file_lock);repeat: 	fd = find_next_zero_bit(files->open_fds->fds_bits, 				files->max_fdset, 				files->next_fd);	/*	 * N.B. For clone tasks sharing a files structure, this test	 * will limit the total number of files that can be opened.	 */	if (fd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)		goto out;	/* Do we need to expand the fd array or fd set?  */	error = expand_files(files, fd);	if (error < 0)		goto out;	if (error) {		/*	 	 * If we needed to expand the fs array we		 * might have blocked - try again.		 */		error = -EMFILE;		goto repeat;	}	FD_SET(fd, files->open_fds);	FD_CLR(fd, files->close_on_exec);	files->next_fd = fd + 1;#if 1	/* Sanity check */	if (files->fd[fd] != NULL) {		printk(KERN_WARNING "get_unused_fd: slot %d not NULL!\n", fd);		files->fd[fd] = NULL;	}#endif	error = fd;out:	spin_unlock(&files->file_lock);	return error;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/badf16621c1f9d1ac753be056fce11b43d6e0be5/open.c/clean/fs/open.c