| .. | .. |
|---|
| 22 | 22 | * as this is the granularity returned by copy_fdset(). |
|---|
| 23 | 23 | */ |
|---|
| 24 | 24 | #define NR_OPEN_DEFAULT BITS_PER_LONG |
|---|
| 25 | +#define NR_OPEN_MAX ~0U |
|---|
| 25 | 26 | |
|---|
| 26 | 27 | struct fdtable { |
|---|
| 27 | 28 | unsigned int max_fds; |
|---|
| .. | .. |
|---|
| 109 | 110 | void put_files_struct(struct files_struct *fs); |
|---|
| 110 | 111 | void reset_files_struct(struct files_struct *); |
|---|
| 111 | 112 | int unshare_files(struct files_struct **); |
|---|
| 112 | | -struct files_struct *dup_fd(struct files_struct *, int *) __latent_entropy; |
|---|
| 113 | +struct files_struct *dup_fd(struct files_struct *, unsigned, int *) __latent_entropy; |
|---|
| 113 | 114 | void do_close_on_exec(struct files_struct *); |
|---|
| 114 | 115 | int iterate_fd(struct files_struct *, unsigned, |
|---|
| 115 | 116 | int (*)(const void *, struct file *, unsigned), |
|---|
| .. | .. |
|---|
| 121 | 122 | unsigned int fd, struct file *file); |
|---|
| 122 | 123 | extern int __close_fd(struct files_struct *files, |
|---|
| 123 | 124 | unsigned int fd); |
|---|
| 125 | +extern int __close_range(unsigned int fd, unsigned int max_fd, unsigned int flags); |
|---|
| 126 | +extern int close_fd_get_file(unsigned int fd, struct file **res); |
|---|
| 127 | +extern int unshare_fd(unsigned long unshare_flags, unsigned int max_fds, |
|---|
| 128 | + struct files_struct **new_fdp); |
|---|
| 124 | 129 | |
|---|
| 125 | 130 | extern struct kmem_cache *files_cachep; |
|---|
| 126 | 131 | |
|---|