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 8d130cc85322..682f928b7f4d 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/namei.h> | ||
19 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
20 | 21 | ||
21 | static ssize_t default_read_file(struct file *file, char __user *buf, | 22 | static ssize_t default_read_file(struct file *file, char __user *buf, |
@@ -44,6 +45,17 @@ const struct file_operations debugfs_file_operations = { | |||
44 | .open = default_open, | 45 | .open = default_open, |
45 | }; | 46 | }; |
46 | 47 | ||
48 | static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd) | ||
49 | { | ||
50 | nd_set_link(nd, dentry->d_inode->i_private); | ||
51 | return NULL; | ||
52 | } | ||
53 | |||
54 | const struct inode_operations debugfs_link_operations = { | ||
55 | .readlink = generic_readlink, | ||
56 | .follow_link = debugfs_follow_link, | ||
57 | }; | ||
58 | |||
47 | static void debugfs_u8_set(void *data, u64 val) | 59 | static void debugfs_u8_set(void *data, u64 val) |
48 | { | 60 | { |
49 | *(u8 *)data = val; | 61 | *(u8 *)data = val; |