patch-2.3.99-pre7 linux/include/linux/file.h

Next file: linux/include/linux/filter.h
Previous file: linux/include/linux/dcache.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/include/linux/file.h linux/include/linux/file.h
@@ -7,23 +7,19 @@
 
 extern void _fput(struct file *);
 
-/*
- * Check whether the specified task has the fd open. Since the task
- * may not have a files_struct, we must test for p->files != NULL.
- */
-extern inline struct file * fcheck_task(struct task_struct *p, unsigned int fd)
+static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
 {
 	struct file * file = NULL;
 
-	if (fd < p->files->max_fds)
-		file = p->files->fd[fd];
+	if (fd < files->max_fds)
+		file = files->fd[fd];
 	return file;
 }
 
 /*
  * Check whether the specified fd has an open file.
  */
-extern inline struct file * fcheck(unsigned int fd)
+static inline struct file * fcheck(unsigned int fd)
 {
 	struct file * file = NULL;
 	struct files_struct *files = current->files;
@@ -33,7 +29,7 @@
 	return file;
 }
 
-extern inline struct file * frip(struct files_struct *files, unsigned int fd)
+static inline struct file * frip(struct files_struct *files, unsigned int fd)
 {
 	struct file * file = NULL;
 
@@ -42,7 +38,7 @@
 	return file;
 }
 
-extern inline struct file * fget(unsigned int fd)
+static inline struct file * fget(unsigned int fd)
 {
 	struct file * file = NULL;
 	struct files_struct *files = current->files;
@@ -58,10 +54,10 @@
 /*
  * 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>: 
  * 
- * Since those functions where calling other functions, it was compleatly 
- * bogous to make them all "extern inline".
+ * Since those functions where calling other functions, it was completely 
+ * bogus to make them all "extern inline".
  *
- * The removal of this pseudo optimization saved me scandaleous:
+ * The removal of this pseudo optimization saved me scandalous:
  *
  * 		3756 (i386 arch) 
  *
@@ -71,7 +67,7 @@
  * I suspect there are many other similar "optimizations" across the
  * kernel...
  */
-extern inline void fput(struct file * file)
+static inline void fput(struct file * file)
 {
 	if (atomic_dec_and_test(&file->f_count))
 		_fput(file);
@@ -88,7 +84,7 @@
  * fput() the struct file we are about to overwrite in this case.
  */
 
-extern inline void fd_install(unsigned int fd, struct file * file)
+static inline void fd_install(unsigned int fd, struct file * file)
 {
 	struct files_struct *files = current->files;
 	struct file * result;
@@ -99,5 +95,7 @@
 	if (result)
 		fput(result);
 }
+
+void put_files_struct(struct files_struct *fs);
 
 #endif /* __LINUX_FILE_H */

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