Commit bf8042f8 authored by Chengchang Tang's avatar Chengchang Tang
Browse files

RDMA/hns: Fix a meaningless loop in active_dca_pages_proc()

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB30V8



----------------------------------------------------------------------

The iterated element does not change, making the loop in
active_dca_pages_proc() meaningless.

Fixes: ef35d79d ("RDMA/hns: Add DCA support for kernel space")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent e519f15b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ static int active_dca_pages_proc(struct dca_mem *mem, int index, void *param)
	}

	for (; changed && i < mem->page_count; i++)
		if (dca_page_is_free(state))
		if (dca_page_is_free(&mem->states[i]))
			free_pages++;

	/* Clean mem changed to dirty */