diff options
Diffstat (limited to 'fs/debugfs/file.c')
-rw-r--r-- | fs/debugfs/file.c | 12 |
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 | ||
100 | const 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 | } | ||
110 | EXPORT_SYMBOL_GPL(debugfs_real_fops); | ||
111 | |||
100 | static int open_proxy_open(struct inode *inode, struct file *filp) | 112 | static 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); |