summaryrefslogtreecommitdiffstats
path: root/include/linux/fdtable.h
diff options
context:
space:
mode:
authorAl Viro2012-08-12 23:27:30 +0200
committerAl Viro2012-09-27 03:08:53 +0200
commitdcfadfa4ec5a12404a99ad6426871a6b03a62b37 (patch)
treea8c2898366470e795dac369040b905985c0bb9fc /include/linux/fdtable.h
parenttake rlimit check to callers of expand_files() (diff)
downloadkernel-qcow2-linux-dcfadfa4ec5a12404a99ad6426871a6b03a62b37.tar.gz
kernel-qcow2-linux-dcfadfa4ec5a12404a99ad6426871a6b03a62b37.tar.xz
kernel-qcow2-linux-dcfadfa4ec5a12404a99ad6426871a6b03a62b37.zip
new helper: __alloc_fd()
Essentially, alloc_fd() in a files_struct we own a reference to. Most of the time wanting to use it is a sign of lousy API design (such as android/binder). It's *not* a general-purpose interface; better that than open-coding its guts, but again, playing with other process' descriptor table is a sign of bad design. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fdtable.h')
-rw-r--r--include/linux/fdtable.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 158a41eed314..b84ca064f727 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -125,6 +125,9 @@ void reset_files_struct(struct files_struct *);
int unshare_files(struct files_struct **);
struct files_struct *dup_fd(struct files_struct *, int *);
+extern int __alloc_fd(struct files_struct *files,
+ unsigned start, unsigned end, unsigned flags);
+
extern struct kmem_cache *files_cachep;
#endif /* __LINUX_FDTABLE_H */