patch-2.2.18 linux/include/linux/file.h

Next file: linux/include/linux/fs.h
Previous file: linux/include/linux/ext2_fs_sb.h
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/linux/file.h linux/include/linux/file.h
@@ -41,6 +41,15 @@
 	return file;
 }
 
+extern int get_unused_fd(void);   /* in fs/open.c */
+
+static inline void put_unused_fd(unsigned int fd)
+{
+	FD_CLR(fd, current->files->open_fds);
+	if (fd < current->files->next_fd)
+		current->files->next_fd = fd;
+}
+
 /*
  * Install a file pointer in the fd array.
  */

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