X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fdebugfs%2Ffile.c;h=682f928b7f4d09e1950ff185f0447dea0869a466;hb=2874b391bd78a5b8cb84be67297a345fbdec4ac8;hp=bf3901ab1744b25355ca54ea82deb578f8aeffc0;hpb=c730f5b621afa33e9f4939da9078669162ebff4e;p=pandora-kernel.git diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index bf3901ab1744..682f928b7f4d 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -16,6 +16,7 @@ #include #include #include +#include #include static ssize_t default_read_file(struct file *file, char __user *buf, @@ -44,6 +45,17 @@ const struct file_operations debugfs_file_operations = { .open = default_open, }; +static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd) +{ + nd_set_link(nd, dentry->d_inode->i_private); + return NULL; +} + +const struct inode_operations debugfs_link_operations = { + .readlink = generic_readlink, + .follow_link = debugfs_follow_link, +}; + static void debugfs_u8_set(void *data, u64 val) { *(u8 *)data = val; @@ -254,7 +266,7 @@ static ssize_t read_file_blob(struct file *file, char __user *user_buf, blob->size); } -static struct file_operations fops_blob = { +static const struct file_operations fops_blob = { .read = read_file_blob, .open = default_open, };