Skip to content

Commit d59a4e2

Browse files
first write 0 to the whole Xattr block,then write header.Instead of only write header range to 0.to follow the linux kernel impl (#2138)
Signed-off-by: Donjuanplatinum <donplat@barrensea.org>
1 parent 3cdc481 commit d59a4e2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • kernel/crates/another_ext4/src/ext4_defs

kernel/crates/another_ext4/src/ext4_defs/xattr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ impl XattrBlock {
350350
/// Initialize a xattr block, write a `XattrHeader` to the
351351
/// beginning of the block.
352352
pub fn init(&mut self) {
353+
self.0.data.fill(0);
353354
let header = XattrHeader::new();
354355
self.0.write_offset_as(0, &header);
355356
}

0 commit comments

Comments
 (0)