
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I87LCF -------------------------------------------------------------------------- DCA debugfs is not needed when DCA is not set for this ucontext. Fixes: a21781182f77 ("RDMA/hns: Add debugfs support for DCA") Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> --- drivers/infiniband/hw/hns/hns_roce_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_debugfs.c b/drivers/infiniband/hw/hns/hns_roce_debugfs.c index cacdeb4d9fad..8df480aa37a4 100644 --- a/drivers/infiniband/hw/hns/hns_roce_debugfs.c +++ b/drivers/infiniband/hw/hns/hns_roce_debugfs.c @@ -508,7 +508,7 @@ void hns_roce_register_uctx_debugfs(struct hns_roce_dev *hr_dev, return; dca_dbgfs = dev_dbgfs->dca_root; - if (dca_dbgfs) { + if (dca_dbgfs && (uctx->config & HNS_ROCE_UCTX_CONFIG_DCA)) { uctx->dca_dbgfs = kzalloc(sizeof(struct hns_dca_ctx_debugfs), GFP_KERNEL); if (!uctx->dca_dbgfs) -- 2.30.0