Commit 5d1b42ee 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/IAMO4D



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

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

Fixes: 12aa71f8 ("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 36f678e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -614,7 +614,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 */