mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Replace VmFrame::zero
with VmWriter::fill
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
195c6a0739
commit
12d338dd9b
@ -845,7 +845,7 @@ impl InodeImpl_ {
|
||||
|
||||
debug_assert!(field::DIRECT.contains(&(bid as usize)));
|
||||
if self.blocks_hole_desc.is_hole(bid as usize) {
|
||||
block.zero();
|
||||
block.writer().fill(0);
|
||||
return Ok(());
|
||||
}
|
||||
let device_bid = Bid::new(self.desc.data[bid as usize] as _);
|
||||
|
@ -414,7 +414,7 @@ impl RamInode {
|
||||
impl PageCacheBackend for RamInode {
|
||||
fn read_page(&self, _idx: usize, frame: &VmFrame) -> Result<()> {
|
||||
// Initially, any block/page in a RamFs inode contains all zeros
|
||||
frame.zero();
|
||||
frame.writer().fill(0);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user