Changes in uspace/lib/ext4/libext4_balloc.c [d579acc:2f591127] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_balloc.c
rd579acc r2f591127 342 342 block_t *bitmap_block; 343 343 uint32_t rel_block_idx = 0; 344 uint32_t free_blocks;345 344 uint32_t goal; 346 345 … … 349 348 if (rc != EOK) 350 349 return rc; 351 350 else if (goal == 0) { 351 /* no goal found => partition is full */ 352 return ENOMEM; 353 } 354 352 355 ext4_superblock_t *sb = inode_ref->fs->superblock; 353 356 … … 363 366 if (rc != EOK) 364 367 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 }372 368 373 369 /* Compute indexes */ … … 473 469 } 474 470 475 goal_failed:476 477 471 rc = ext4_filesystem_put_block_group_ref(bg_ref); 478 472 if (rc != EOK) … … 490 484 if (rc != EOK) 491 485 return rc; 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 486 500 487 /* Load block with bitmap */ 501 488 bitmap_block_addr = … … 564 551 } 565 552 566 next_group:567 553 rc = ext4_filesystem_put_block_group_ref(bg_ref); 568 554 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.