Commit 8add862f authored by Al Viro's avatar Al Viro

tegra: don't wank with d_find_alias()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0990a97a
...@@ -1026,15 +1026,11 @@ static ssize_t smmu_debugfs_stats_write(struct file *file, ...@@ -1026,15 +1026,11 @@ static ssize_t smmu_debugfs_stats_write(struct file *file,
static int smmu_debugfs_stats_show(struct seq_file *s, void *v) static int smmu_debugfs_stats_show(struct seq_file *s, void *v)
{ {
struct smmu_debugfs_info *info; struct smmu_debugfs_info *info = s->private;
struct smmu_device *smmu; struct smmu_device *smmu = info->smmu;
struct dentry *dent;
int i; int i;
const char * const stats[] = { "hit", "miss", }; const char * const stats[] = { "hit", "miss", };
dent = d_find_alias(s->private);
info = dent->d_inode->i_private;
smmu = info->smmu;
for (i = 0; i < ARRAY_SIZE(stats); i++) { for (i = 0; i < ARRAY_SIZE(stats); i++) {
u32 val; u32 val;
...@@ -1048,14 +1044,12 @@ static int smmu_debugfs_stats_show(struct seq_file *s, void *v) ...@@ -1048,14 +1044,12 @@ static int smmu_debugfs_stats_show(struct seq_file *s, void *v)
stats[i], val, offs); stats[i], val, offs);
} }
seq_printf(s, "\n"); seq_printf(s, "\n");
dput(dent);
return 0; return 0;
} }
static int smmu_debugfs_stats_open(struct inode *inode, struct file *file) static int smmu_debugfs_stats_open(struct inode *inode, struct file *file)
{ {
return single_open(file, smmu_debugfs_stats_show, inode); return single_open(file, smmu_debugfs_stats_show, inode->i_private);
} }
static const struct file_operations smmu_debugfs_stats_fops = { static const struct file_operations smmu_debugfs_stats_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment