Changeset 82cb6768 in mainline for uspace/lib/ext4/libext4_balloc.c


Ignore:
Timestamp:
2012-04-10T20:01:46Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2a3e57
Parents:
b73530a
Message:

debugged version of splitting root extent node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_balloc.c

    rb73530a r82cb6768  
    569569}
    570570
    571 int ext4_balloc_try_alloc_block(ext4_inode_ref_t *inode_ref, uint32_t fblock)
     571int ext4_balloc_try_alloc_block(ext4_inode_ref_t *inode_ref,
     572                uint32_t fblock, bool *free)
    572573{
    573574        int rc;
     
    595596        }
    596597
    597         bool free = ext4_bitmap_is_free_bit(bitmap_block->data, index_in_group);
    598 
    599         if (free) {
     598        *free = ext4_bitmap_is_free_bit(bitmap_block->data, index_in_group);
     599
     600        if (*free) {
    600601                ext4_bitmap_set_bit(bitmap_block->data, index_in_group);
    601602                bitmap_block->dirty = true;
     
    610611        }
    611612
    612         if (!free) {
    613                 rc = EINVAL;
     613        if (!(*free)) {
    614614                goto terminate;
    615615        }
Note: See TracChangeset for help on using the changeset viewer.