Changeset 2f591127 in mainline
- Timestamp:
- 2014-01-19T14:35:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5828554
- Parents:
- a159c6a
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_balloc.c
ra159c6a r2f591127 91 91 block_t *bitmap_block; 92 92 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 0); 93 if (rc != EOK) 94 return rc; 93 if (rc != EOK) { 94 ext4_filesystem_put_block_group_ref(bg_ref); 95 return rc; 96 } 95 97 96 98 /* Modify bitmap */ … … 513 515 bitmap_block->dirty = true; 514 516 rc = block_put(bitmap_block); 515 if (rc != EOK) 517 if (rc != EOK) { 518 ext4_filesystem_put_block_group_ref(bg_ref); 516 519 return rc; 520 } 517 521 518 522 allocated_block = … … 529 533 bitmap_block->dirty = true; 530 534 rc = block_put(bitmap_block); 531 if (rc != EOK) 535 if (rc != EOK) { 536 ext4_filesystem_put_block_group_ref(bg_ref); 532 537 return rc; 538 } 533 539 534 540 allocated_block = … … 600 606 bool *free) 601 607 { 602 int rc = EOK;608 int rc; 603 609 604 610 ext4_filesystem_t *fs = inode_ref->fs; … … 621 627 block_t *bitmap_block; 622 628 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 0); 623 if (rc != EOK) 624 return rc; 629 if (rc != EOK) { 630 ext4_filesystem_put_block_group_ref(bg_ref); 631 return rc; 632 } 625 633 626 634 /* Check if block is free */ -
uspace/lib/ext4/libext4_ialloc.c
ra159c6a r2f591127 204 204 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 205 205 BLOCK_FLAGS_NONE); 206 if (rc != EOK) 206 if (rc != EOK) { 207 ext4_filesystem_put_block_group_ref(bg_ref); 207 208 return rc; 209 } 208 210 209 211 /* Try to allocate i-node in the bitmap */ … … 225 227 return rc; 226 228 229 bgid++; 227 230 continue; 228 231 } … … 232 235 233 236 rc = block_put(bitmap_block); 234 if (rc != EOK) 237 if (rc != EOK) { 238 ext4_filesystem_put_block_group_ref(bg_ref); 235 239 return rc; 240 } 236 241 237 242 /* Modify filesystem counters */ -
uspace/srv/fs/ext4fs/ext4fs_ops.c
ra159c6a r2f591127 1403 1403 } 1404 1404 1405 if (flags == BLOCK_FLAGS_NOREAD) 1405 if (flags == BLOCK_FLAGS_NOREAD) { 1406 1406 memset(write_block->data, 0, block_size); 1407 write_block->dirty = true; 1408 } 1407 1409 1408 1410 rc = async_data_write_finalize(callid, write_block->data + 1409 1411 (pos % block_size), bytes); 1410 if (rc != EOK) 1412 if (rc != EOK) { 1413 block_put(write_block); 1411 1414 goto exit; 1412 1413 write_block->dirty = true; 1414 1415 } 1416 1415 1417 rc = block_put(write_block); 1416 1418 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.