소스 검색

fix: alloc update counter

liujingx 10 달 전
부모
커밋
fb6659f8f8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/ext4/alloc.rs

+ 1 - 1
src/ext4/alloc.rs

@@ -280,7 +280,7 @@ impl Ext4 {
         self.write_block_group_with_csum(&mut bg);
 
         // Update superblock counters
-        sb.set_free_inodes_count(sb.free_inodes_count() - 1);
+        sb.set_free_inodes_count(sb.free_inodes_count() + 1);
         self.write_super_block(&sb);
 
         // Clear inode content