Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Cyrill Gorcunov | faf60af | 2012-08-23 14:43:24 +0400 | [diff] [blame] | 2 | #ifndef __PROCFS_FD_H__ |
| 3 | #define __PROCFS_FD_H__ |
| 4 | |
| 5 | #include <linux/fs.h> |
| 6 | |
| 7 | extern const struct file_operations proc_fd_operations; |
| 8 | extern const struct inode_operations proc_fd_inode_operations; |
| 9 | |
| 10 | extern const struct file_operations proc_fdinfo_operations; |
| 11 | extern const struct inode_operations proc_fdinfo_inode_operations; |
| 12 | |
Christian Brauner | 549c729 | 2021-01-21 14:19:43 +0100 | [diff] [blame] | 13 | extern int proc_fd_permission(struct user_namespace *mnt_userns, |
| 14 | struct inode *inode, int mask); |
Cyrill Gorcunov | faf60af | 2012-08-23 14:43:24 +0400 | [diff] [blame] | 15 | |
Alexey Dobriyan | 771187d | 2016-09-02 00:42:02 +0300 | [diff] [blame] | 16 | static inline unsigned int proc_fd(struct inode *inode) |
David Howells | c3bef7b | 2013-04-12 01:42:56 +0100 | [diff] [blame] | 17 | { |
| 18 | return PROC_I(inode)->fd; |
| 19 | } |
| 20 | |
Cyrill Gorcunov | faf60af | 2012-08-23 14:43:24 +0400 | [diff] [blame] | 21 | #endif /* __PROCFS_FD_H__ */ |