Changeset ca47f656 in mainline
- Timestamp:
- 2012-06-03T15:05:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 840e227
- Parents:
- 4059a28
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
r4059a28 rca47f656 544 544 545 545 ext4fs_node_t *enode = EXT4FS_NODE(fn); 546 ext4_filesystem_t *fs = enode->instance->filesystem;547 546 ext4_inode_ref_t *inode_ref = enode->inode_ref; 548 547 … … 555 554 556 555 // Handle orphans 557 uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 558 if (rev_level > 0) { 559 ext4_filesystem_delete_orphan(inode_ref); 560 } 556 // ext4_filesystem_t *fs = enode->instance->filesystem; 557 // uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 558 // uint16_t lnk_count = ext4_inode_get_links_count(inode_ref->inode); 559 // if ((rev_level > 0) && (lnk_count == 0)) { 560 // rc = ext4_filesystem_delete_orphan(inode_ref); 561 // if (rc != EOK) { 562 // EXT4FS_DBG("delete orphan error, rc = \%d", rc); 563 // } 564 // } 561 565 562 566 // TODO set real deletion time when it will be supported, 563 567 // temporary set fake time 564 568 // time_t now = time(NULL); 565 ext4_inode_set_deletion_time(inode_ref->inode, 12345678);569 ext4_inode_set_deletion_time(inode_ref->inode, 0xdeadbeef); 566 570 inode_ref->dirty = true; 567 571 … … 573 577 } 574 578 575 ext4fs_node_put(fn); 576 return EOK; 579 return ext4fs_node_put(fn); 577 580 } 578 581 … … 674 677 // Remove entry from parent directory 675 678 ext4_inode_ref_t *parent = EXT4FS_NODE(pfn)->inode_ref; 676 ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem;677 679 rc = ext4_directory_remove_entry(parent, name); 678 680 if (rc != EOK) { … … 703 705 } 704 706 705 uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 706 if ((rev_level > 0) && (lnk_count == 0)) { 707 ext4_filesystem_add_orphan(child_inode_ref); 708 } 707 // ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem; 708 // uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 709 // if ((rev_level > 0) && (lnk_count == 0)) { 710 // rc = ext4_filesystem_add_orphan(child_inode_ref); 711 // if (rc != EOK) { 712 // EXT4FS_DBG("add orphan error, rc = \%d", rc); 713 // } 714 // } 709 715 710 716 // TODO set timestamps for parent (when we have wall-clock time)
Note:
See TracChangeset
for help on using the changeset viewer.