blob: c5a921a06a0b68619d295f31d92dae33f122a3cc [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Cyrill Gorcunovfaf60af2012-08-23 14:43:24 +04002#ifndef __PROCFS_FD_H__
3#define __PROCFS_FD_H__
4
5#include <linux/fs.h>
6
7extern const struct file_operations proc_fd_operations;
8extern const struct inode_operations proc_fd_inode_operations;
9
10extern const struct file_operations proc_fdinfo_operations;
11extern const struct inode_operations proc_fdinfo_inode_operations;
12
Christian Brauner549c7292021-01-21 14:19:43 +010013extern int proc_fd_permission(struct user_namespace *mnt_userns,
14 struct inode *inode, int mask);
Cyrill Gorcunovfaf60af2012-08-23 14:43:24 +040015
Alexey Dobriyan771187d2016-09-02 00:42:02 +030016static inline unsigned int proc_fd(struct inode *inode)
David Howellsc3bef7b2013-04-12 01:42:56 +010017{
18 return PROC_I(inode)->fd;
19}
20
Cyrill Gorcunovfaf60af2012-08-23 14:43:24 +040021#endif /* __PROCFS_FD_H__ */