aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorDave Hansen <[email protected]>2008-02-15 22:37:26 +0000
committerAl Viro <[email protected]>2008-03-19 10:54:05 +0000
commit430e285e0817e3e18aadd814bc078d50d8af0cbf (patch)
treecbd008864e18e76a7e2984bfd1898028762fd19a /fs/file_table.c
parent[PATCH] check for null vfsmount in dentry_open() (diff)
downloadkernel-430e285e0817e3e18aadd814bc078d50d8af0cbf.tar.gz
kernel-430e285e0817e3e18aadd814bc078d50d8af0cbf.zip
[PATCH] fix up new filp allocators
Some new uses of get_empty_filp() have crept in; switched to alloc_file() to make sure that pieces of initialization won't be missing. We really need to kill get_empty_filp(). [AV] fixed dentry leak on failure exit in anon_inode_getfd() Cc: Erez Zadok <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J Bruce Fields" <[email protected]> Acked-by: Al Viro <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 6d27befe2d48..986ff4ed0a7c 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -83,6 +83,12 @@ int proc_nr_files(ctl_table *table, int write, struct file *filp,
/* Find an unused file structure and return a pointer to it.
* Returns NULL, if there are no more free file structures or
* we run out of memory.
+ *
+ * Be very careful using this. You are responsible for
+ * getting write access to any mount that you might assign
+ * to this filp, if it is opened for write. If this is not
+ * done, you will imbalance int the mount's writer count
+ * and a warning at __fput() time.
*/
struct file *get_empty_filp(void)
{