]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove
authorPotnuri Bharat Teja <bharat@chelsio.com>
Sun, 24 May 2020 19:08:14 +0000 (00:38 +0530)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
BugLink: https://bugs.launchpad.net/bugs/1885322
[ Upstream commit 49ea0c036ede81f126f1a9389d377999fdf5c5a1 ]

Remove device specific debugfs entries immediately if LLD detaches a
particular ULD device in case of fatal PCI errors.

Link: https://lore.kernel.org/r/20200524190814.17599-1-bharat@chelsio.com
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/infiniband/hw/cxgb4/device.c

index 599340c1f0b82c61171db4211532461f6a790aa7..541dbcf22d0ebf78aec4a979336bacc7357600bb 100644 (file)
@@ -953,6 +953,7 @@ void c4iw_dealloc(struct uld_ctx *ctx)
 static void c4iw_remove(struct uld_ctx *ctx)
 {
        pr_debug("c4iw_dev %p\n", ctx->dev);
+       debugfs_remove_recursive(ctx->dev->debugfs_root);
        c4iw_unregister_device(ctx->dev);
        c4iw_dealloc(ctx);
 }