aboutsummaryrefslogtreecommitdiffstats
path: root/fs/debugfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/debugfs/file.c')
-rw-r--r--fs/debugfs/file.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 6dabc4a10396..b6f5ddab66bf 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -97,6 +97,18 @@ EXPORT_SYMBOL_GPL(debugfs_use_file_finish);
97 97
98#define F_DENTRY(filp) ((filp)->f_path.dentry) 98#define F_DENTRY(filp) ((filp)->f_path.dentry)
99 99
100const struct file_operations *debugfs_real_fops(const struct file *filp)
101 __must_hold(&debugfs_srcu)
102{
103 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata;
104 /*
105 * Neither the pointer to the struct file_operations, nor its
106 * contents ever change -- srcu_dereference() is not needed here.
107 */
108 return fsd->real_fops;
109}
110EXPORT_SYMBOL_GPL(debugfs_real_fops);
111
100static int open_proxy_open(struct inode *inode, struct file *filp) 112static int open_proxy_open(struct inode *inode, struct file *filp)
101{ 113{
102 const struct dentry *dentry = F_DENTRY(filp); 114 const struct dentry *dentry = F_DENTRY(filp);