Lines Matching refs:fd
28 struct file __rcu **fd; /* current fd array */ member
35 static inline bool close_on_exec(unsigned int fd, const struct fdtable *fdt) in close_on_exec() argument
37 return test_bit(fd, fdt->close_on_exec); in close_on_exec()
40 static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt) in fd_is_open() argument
42 return test_bit(fd, fdt->open_fds); in fd_is_open()
82 static inline struct file *__fcheck_files(struct files_struct *files, unsigned int fd) in __fcheck_files() argument
86 if (fd < fdt->max_fds) { in __fcheck_files()
87 fd = array_index_nospec(fd, fdt->max_fds); in __fcheck_files()
88 return rcu_dereference_raw(fdt->fd[fd]); in __fcheck_files()
93 static inline struct file *fcheck_files(struct files_struct *files, unsigned int fd) in fcheck_files() argument
98 return __fcheck_files(files, fd); in fcheck_files()
104 #define fcheck(fd) fcheck_files(current->files, fd) argument
121 unsigned int fd, struct file *file);
123 unsigned int fd);
124 extern int __close_fd_get_file(unsigned int fd, struct file **res);