Commit cd58849b authored by Alaa Hleihel's avatar Alaa Hleihel Committed by Kelsey Skunberg

IB/ipoib: Do not warn if IPoIB debugfs doesn't exist

BugLink: https://bugs.launchpad.net/bugs/1873852

[ Upstream commit 14fa91e0 ]

netdev_wait_allrefs() could rebroadcast NETDEV_UNREGISTER event
multiple times until all refs are gone, which will result in calling
ipoib_delete_debug_files multiple times and printing a warning.

Remove the WARN_ONCE since checks of NULL pointers before calling
debugfs_remove are not needed.

Fixes: 771a5258 ("IB/IPoIB: ibX: failed to create mcg debug file")
Signed-off-by: default avatarAlaa Hleihel <alaa@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 783bc320
...@@ -281,8 +281,6 @@ void ipoib_delete_debug_files(struct net_device *dev) ...@@ -281,8 +281,6 @@ void ipoib_delete_debug_files(struct net_device *dev)
{ {
struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_dev_priv *priv = netdev_priv(dev);
WARN_ONCE(!priv->mcg_dentry, "null mcg debug file\n");
WARN_ONCE(!priv->path_dentry, "null path debug file\n");
debugfs_remove(priv->mcg_dentry); debugfs_remove(priv->mcg_dentry);
debugfs_remove(priv->path_dentry); debugfs_remove(priv->path_dentry);
priv->mcg_dentry = priv->path_dentry = NULL; priv->mcg_dentry = priv->path_dentry = NULL;
......
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