提交 26d2b310 编写于 作者: T tangwenji 提交者: Nicholas Bellinger

tcmu: fix page addr in tcmu_flush_dcache_range

The page addr should be update.
Signed-off-by: Ntangwenji <tang.wenji@zte.com.cn>
Signed-off-by: NMike Christie <mchristi@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 094bb5d7
......@@ -455,12 +455,13 @@ static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd)
static inline void tcmu_flush_dcache_range(void *vaddr, size_t size)
{
unsigned long offset = offset_in_page(vaddr);
void *start = vaddr - offset;
size = round_up(size+offset, PAGE_SIZE);
vaddr -= offset;
while (size) {
flush_dcache_page(virt_to_page(vaddr));
flush_dcache_page(virt_to_page(start));
start += PAGE_SIZE;
size -= PAGE_SIZE;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册