Commit 628fa76b authored by Wei Liu's avatar Wei Liu Committed by David S. Miller

xen-netback: fix debugfs entry creation

The original code is bogus. The function gets called in a loop which
leaks entries created in previous rounds.
Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
Cc: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c807005
...@@ -174,10 +174,9 @@ static const struct file_operations xenvif_dbg_io_ring_ops_fops = { ...@@ -174,10 +174,9 @@ static const struct file_operations xenvif_dbg_io_ring_ops_fops = {
.write = xenvif_write_io_ring, .write = xenvif_write_io_ring,
}; };
static void xenvif_debugfs_addif(struct xenvif_queue *queue) static void xenvif_debugfs_addif(struct xenvif *vif)
{ {
struct dentry *pfile; struct dentry *pfile;
struct xenvif *vif = queue->vif;
int i; int i;
if (IS_ERR_OR_NULL(xen_netback_dbg_root)) if (IS_ERR_OR_NULL(xen_netback_dbg_root))
...@@ -736,10 +735,11 @@ static void connect(struct backend_info *be) ...@@ -736,10 +735,11 @@ static void connect(struct backend_info *be)
be->vif->num_queues = queue_index; be->vif->num_queues = queue_index;
goto err; goto err;
} }
}
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
xenvif_debugfs_addif(queue); xenvif_debugfs_addif(be->vif);
#endif /* CONFIG_DEBUG_FS */ #endif /* CONFIG_DEBUG_FS */
}
/* Initialisation completed, tell core driver the number of /* Initialisation completed, tell core driver the number of
* active queues. * active queues.
......
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