return res;
}
-static int debugfs_link(struct dentry *dentry, umode_t mode,
- void *data)
-{
- struct inode *dir = dentry->d_parent->d_inode;
- mode = (mode & S_IALLUGO) | S_IFLNK;
- return debugfs_mknod(dir, dentry, mode, 0, data, NULL);
-}
-
static int debugfs_create(struct dentry *dentry, umode_t mode,
void *data, const struct file_operations *fops)
{
return NULL;
}
- error = debugfs_link(dentry, S_IFLNK | S_IRWXUGO, link);
+ error = debugfs_mknod(dentry->d_parent->d_inode, dentry,
+ S_IFLNK | S_IRWXUGO, 0, link, NULL);
if (error)
kfree(link);