Changeset 1ac1ab4 in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c
- Timestamp:
- 2012-03-31T20:00:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2fa350
- Parents:
- 38384ae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
r38384ae r1ac1ab4 211 211 212 212 ext4_directory_search_result_t result; 213 rc = ext4_directory_find_entry( fs,&result, eparent->inode_ref, component);213 rc = ext4_directory_find_entry(&result, eparent->inode_ref, component); 214 214 if (rc != EOK) { 215 215 if (rc == ENOENT) { … … 448 448 ext4_inode_ref_t *inode_ref = enode->inode_ref; 449 449 450 rc = ext4_filesystem_truncate_inode( fs,inode_ref, 0);450 rc = ext4_filesystem_truncate_inode(inode_ref, 0); 451 451 if (rc != EOK) { 452 452 ext4fs_node_put(fn); … … 456 456 uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 457 457 if (rev_level > 0) { 458 ext4_filesystem_delete_orphan( fs,inode_ref);458 ext4_filesystem_delete_orphan(inode_ref); 459 459 } 460 460 … … 465 465 inode_ref->dirty = true; 466 466 467 rc = ext4_filesystem_free_inode( fs,inode_ref);467 rc = ext4_filesystem_free_inode(inode_ref); 468 468 if (rc != EOK) { 469 469 ext4fs_node_put(fn); … … 489 489 490 490 // Add entry to parent directory 491 rc = ext4_directory_add_entry( fs,parent->inode_ref, name, child->inode_ref);491 rc = ext4_directory_add_entry(parent->inode_ref, name, child->inode_ref); 492 492 if (rc != EOK) { 493 493 return rc; … … 497 497 if (ext4_inode_is_type(fs->superblock, child->inode_ref->inode, EXT4_INODE_MODE_DIRECTORY)) { 498 498 499 rc = ext4_directory_add_entry( fs,child->inode_ref, ".", child->inode_ref);499 rc = ext4_directory_add_entry(child->inode_ref, ".", child->inode_ref); 500 500 if (rc != EOK) { 501 ext4_directory_remove_entry( fs,parent->inode_ref, name);501 ext4_directory_remove_entry(parent->inode_ref, name); 502 502 return rc; 503 503 } 504 504 505 rc = ext4_directory_add_entry( fs,child->inode_ref, "..", parent->inode_ref);505 rc = ext4_directory_add_entry(child->inode_ref, "..", parent->inode_ref); 506 506 if (rc != EOK) { 507 ext4_directory_remove_entry( fs,parent->inode_ref, name);508 ext4_directory_remove_entry( fs,child->inode_ref, ".");507 ext4_directory_remove_entry(parent->inode_ref, name); 508 ext4_directory_remove_entry(child->inode_ref, "."); 509 509 return rc; 510 510 } … … 546 546 ext4_inode_ref_t *parent = EXT4FS_NODE(pfn)->inode_ref; 547 547 ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem; 548 rc = ext4_directory_remove_entry( fs,parent, name);548 rc = ext4_directory_remove_entry(parent, name); 549 549 if (rc != EOK) { 550 550 return rc; … … 576 576 uint32_t rev_level = ext4_superblock_get_rev_level(fs->superblock); 577 577 if ((rev_level > 0) && (lnk_count == 0)) { 578 ext4_filesystem_add_orphan( fs,child_inode_ref);578 ext4_filesystem_add_orphan(child_inode_ref); 579 579 } 580 580 … … 1002 1002 /* Get the real block number */ 1003 1003 uint32_t fs_block; 1004 rc = ext4_filesystem_get_inode_data_block_index(inst->filesystem, 1005 inode_ref, file_block, &fs_block); 1004 rc = ext4_filesystem_get_inode_data_block_index(inode_ref, file_block, &fs_block); 1006 1005 if (rc != EOK) { 1007 1006 async_answer_0(callid, rc); … … 1090 1089 1091 1090 ext4_inode_ref_t *inode_ref = enode->inode_ref; 1092 rc = ext4_filesystem_get_inode_data_block_index( fs,inode_ref, iblock, &fblock);1091 rc = ext4_filesystem_get_inode_data_block_index(inode_ref, iblock, &fblock); 1093 1092 if (rc != EOK) { 1094 1093 ext4fs_node_put(fn); … … 1098 1097 1099 1098 if (fblock == 0) { 1100 rc = ext4_balloc_alloc_block( fs,inode_ref, &fblock);1099 rc = ext4_balloc_alloc_block(inode_ref, &fblock); 1101 1100 if (rc != EOK) { 1102 1101 ext4fs_node_put(fn); … … 1105 1104 } 1106 1105 1107 rc = ext4_filesystem_set_inode_data_block_index( fs,inode_ref, iblock, fblock);1106 rc = ext4_filesystem_set_inode_data_block_index(inode_ref, iblock, fblock); 1108 1107 if (rc != EOK) { 1109 ext4_balloc_free_block( fs,inode_ref, fblock);1108 ext4_balloc_free_block(inode_ref, fblock); 1110 1109 ext4fs_node_put(fn); 1111 1110 async_answer_0(callid, rc); … … 1169 1168 ext4fs_node_t *enode = EXT4FS_NODE(fn); 1170 1169 ext4_inode_ref_t *inode_ref = enode->inode_ref; 1171 ext4_filesystem_t *fs = enode->instance->filesystem; 1172 1173 rc = ext4_filesystem_truncate_inode(fs, inode_ref, new_size); 1170 1171 rc = ext4_filesystem_truncate_inode(inode_ref, new_size); 1174 1172 ext4fs_node_put(fn); 1175 1173
Note:
See TracChangeset
for help on using the changeset viewer.