1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2faf60af1SCyrill Gorcunov #ifndef __PROCFS_FD_H__ 3faf60af1SCyrill Gorcunov #define __PROCFS_FD_H__ 4faf60af1SCyrill Gorcunov 5faf60af1SCyrill Gorcunov #include <linux/fs.h> 6faf60af1SCyrill Gorcunov 7faf60af1SCyrill Gorcunov extern const struct file_operations proc_fd_operations; 8faf60af1SCyrill Gorcunov extern const struct inode_operations proc_fd_inode_operations; 9faf60af1SCyrill Gorcunov 10faf60af1SCyrill Gorcunov extern const struct file_operations proc_fdinfo_operations; 11faf60af1SCyrill Gorcunov extern const struct inode_operations proc_fdinfo_inode_operations; 12faf60af1SCyrill Gorcunov 13*4609e1f1SChristian Brauner extern int proc_fd_permission(struct mnt_idmap *idmap, 14549c7297SChristian Brauner struct inode *inode, int mask); 15faf60af1SCyrill Gorcunov proc_fd(struct inode * inode)16771187d6SAlexey Dobriyanstatic inline unsigned int proc_fd(struct inode *inode) 17c3bef7bcSDavid Howells { 18c3bef7bcSDavid Howells return PROC_I(inode)->fd; 19c3bef7bcSDavid Howells } 20c3bef7bcSDavid Howells 21faf60af1SCyrill Gorcunov #endif /* __PROCFS_FD_H__ */ 22