Fix VMO commit address when needs IO

This commit is contained in:
Qingsong Chen 2025-07-23 02:25:30 +00:00 committed by Chengjun Chen
parent 6ecccad3ee
commit eb64ca1cea
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ impl VmMapping {
Err(VmoCommitError::NeedIo(index)) => {
drop(preempt_guard);
vmo.commit_on(index, CommitFlags::empty())?;
start_addr = index * PAGE_SIZE + self.map_to_addr;
start_addr = (index * PAGE_SIZE - vmo.offset) + self.map_to_addr;
continue 'retry;
}
Err(VmoCommitError::Err(e)) => return Err(e),