xref: /OK3568_Linux_fs/kernel/fs/proc/fd.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __PROCFS_FD_H__
3*4882a593Smuzhiyun #define __PROCFS_FD_H__
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <linux/fs.h>
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun extern const struct file_operations proc_fd_operations;
8*4882a593Smuzhiyun extern const struct inode_operations proc_fd_inode_operations;
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun extern const struct file_operations proc_fdinfo_operations;
11*4882a593Smuzhiyun extern const struct inode_operations proc_fdinfo_inode_operations;
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun extern int proc_fd_permission(struct inode *inode, int mask);
14*4882a593Smuzhiyun 
proc_fd(struct inode * inode)15*4882a593Smuzhiyun static inline unsigned int proc_fd(struct inode *inode)
16*4882a593Smuzhiyun {
17*4882a593Smuzhiyun 	return PROC_I(inode)->fd;
18*4882a593Smuzhiyun }
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #endif /* __PROCFS_FD_H__ */
21