mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
tcmu: fix page addr in tcmu_flush_dcache_range
The page addr should be update. Signed-off-by: tangwenji <[email protected]> Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
1 parent
094bb5d766
commit
26d2b3106f
1 file changed
+3
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user