summaryrefslogtreecommitdiffstats
path: root/include/linux/file.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /include/linux/file.h
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'include/linux/file.h')
-rw-r--r--include/linux/file.h48
1 files changed, 18 insertions, 30 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index 0884fad2f..05f388f08 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -6,7 +6,6 @@
#define __LINUX_FILE_H
extern void __fput(struct file *);
-extern void insert_file_free(struct file *file);
/*
* Check whether the specified task has the fd open. Since the task
@@ -50,34 +49,23 @@ extern inline void fd_install(unsigned int fd, struct file *file)
current->files->fd[fd] = file;
}
-/* It does not matter which list it is on. */
-extern inline void remove_filp(struct file *file)
-{
- if(file->f_next)
- file->f_next->f_pprev = file->f_pprev;
- *file->f_pprev = file->f_next;
-}
-
-extern inline void fput(struct file *file)
-{
- int count = file->f_count-1;
-
- if (!count) {
- locks_remove_flock(file);
- __fput(file);
- file->f_count = 0;
- remove_filp(file);
- insert_file_free(file);
- } else
- file->f_count = count;
-}
-
-extern inline void put_filp(struct file *file)
-{
- if(--file->f_count == 0) {
- remove_filp(file);
- insert_file_free(file);
- }
-}
+/*
+ * 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".
+ *
+ * The removal of this pseudo optimization saved me scandaleous:
+ *
+ * 3756 (i386 arch)
+ *
+ * precious bytes from my kernel, even without counting all the code compiled
+ * as module!
+ *
+ * I suspect there are many other similar "optimizations" across the
+ * kernel...
+ */
+extern void fput(struct file *file);
+extern void put_filp(struct file *file);
#endif