diff options
Diffstat (limited to 'include/linux/file.h')
-rw-r--r-- | include/linux/file.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index 142d102f285e..39704eae83e2 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -9,11 +9,11 @@ #include <linux/compiler.h> #include <linux/types.h> #include <linux/posix_types.h> +#include <linux/errno.h> struct file; extern void fput(struct file *); -extern void fput_many(struct file *, unsigned int); struct file_operations; struct task_struct; @@ -46,7 +46,6 @@ static inline void fdput(struct fd fd) } extern struct file *fget(unsigned int fd); -extern struct file *fget_many(unsigned int fd, unsigned int refs); extern struct file *fget_raw(unsigned int fd); extern struct file *fget_task(struct task_struct *task, unsigned int fd); extern unsigned long __fdget(unsigned int fd); @@ -91,7 +90,23 @@ extern void put_unused_fd(unsigned int fd); extern void fd_install(unsigned int fd, struct file *file); +extern int __receive_fd(struct file *file, int __user *ufd, + unsigned int o_flags); + +extern int receive_fd(struct file *file, unsigned int o_flags); + +static inline int receive_fd_user(struct file *file, int __user *ufd, + unsigned int o_flags) +{ + if (ufd == NULL) + return -EFAULT; + return __receive_fd(file, ufd, o_flags); +} +int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags); + extern void flush_delayed_fput(void); extern void __fput_sync(struct file *); +extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max; + #endif /* __LINUX_FILE_H */ |