Changeset d579acc in mainline
- Timestamp:
- 2014-03-31T22:27:02Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 70b570c
- Parents:
- 9a5abb78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_balloc.c
r9a5abb78 rd579acc 342 342 block_t *bitmap_block; 343 343 uint32_t rel_block_idx = 0; 344 uint32_t free_blocks; 344 345 uint32_t goal; 345 346 … … 348 349 if (rc != EOK) 349 350 return rc; 350 else if (goal == 0) { 351 /* no goal found => partition is full */ 352 return ENOMEM; 353 } 354 351 355 352 ext4_superblock_t *sb = inode_ref->fs->superblock; 356 353 … … 366 363 if (rc != EOK) 367 364 return rc; 365 366 free_blocks = 367 ext4_block_group_get_free_blocks_count(bg_ref->block_group, sb); 368 if (free_blocks == 0) { 369 /* This group has no free blocks */ 370 goto goal_failed; 371 } 368 372 369 373 /* Compute indexes */ … … 469 473 } 470 474 475 goal_failed: 476 471 477 rc = ext4_filesystem_put_block_group_ref(bg_ref); 472 478 if (rc != EOK) … … 484 490 if (rc != EOK) 485 491 return rc; 486 492 493 free_blocks = 494 ext4_block_group_get_free_blocks_count(bg_ref->block_group, sb); 495 if (free_blocks == 0) { 496 /* This group has no free blocks */ 497 goto next_group; 498 } 499 487 500 /* Load block with bitmap */ 488 501 bitmap_block_addr = … … 551 564 } 552 565 566 next_group: 553 567 rc = ext4_filesystem_put_block_group_ref(bg_ref); 554 568 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.