summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-15 21:06:33 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:08:55 -0400
commitf869e8a7f753e3fd43d6483e796774776f645edb (patch)
tree3b215f30a040812eb7488bd4596a5c3ae0b50e51 /include/linux
parent56007cae94f349387c088e738c7dcb6bc513063b (diff)
expose a low-level variant of fd_install() for binder
Similar situation to that of __alloc_fd(); do not use unless you really have to. You should not touch any descriptor table other than your own; it's a sure sign of a really bad API design. As with __alloc_fd(), you *must* use a first-class reference to struct files_struct; something obtained by get_files_struct(some task) (let alone direct task->files) will not do. It must be either current->files, or obtained by get_files_struct(current) by the owner of that sucker and given to you. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fdtable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 3855f4febe7..59d4fc7f10c 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -121,6 +121,8 @@ struct files_struct *dup_fd(struct files_struct *, int *);
extern int __alloc_fd(struct files_struct *files,
unsigned start, unsigned end, unsigned flags);
+extern void __fd_install(struct files_struct *files,
+ unsigned int fd, struct file *file);
extern struct kmem_cache *files_cachep;