Improve the read/write efficiency of Vmo

This commit is contained in:
Chen Chengjun
2024-05-11 15:08:52 +08:00
committed by Tate, Hongliang Tian
parent f4ea23b72c
commit 25b7007ffa
3 changed files with 36 additions and 15 deletions

View File

@ -84,7 +84,7 @@ impl Vmo<Rights> {
/// The method requires the Write right.
pub fn commit(&self, range: Range<usize>) -> Result<()> {
self.check_rights(Rights::WRITE)?;
self.0.commit(range, false)?;
self.0.commit_and_operate(&range, |_| {}, false)?;
Ok(())
}