Changeset e5a1ace3 in mainline for uspace/lib/ext4/libext4_balloc.c


Ignore:
Timestamp:
2013-11-28T20:40:38Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f63d9d
Parents:
532f53d
Message:

libext4: do not ignore error codes

File:
1 edited

Legend:

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

    r532f53d re5a1ace3  
    328328        *goal = inode_table_first_block + inode_table_blocks;
    329329       
    330         ext4_filesystem_put_block_group_ref(bg_ref);
    331        
    332         return EOK;
     330        return ext4_filesystem_put_block_group_ref(bg_ref);
    333331}
    334332
     
    469467       
    470468        /* No free block found yet */
    471         block_put(bitmap_block);
    472         ext4_filesystem_put_block_group_ref(bg_ref);
     469        rc = block_put(bitmap_block);
     470        if (rc != EOK) {
     471                ext4_filesystem_put_block_group_ref(bg_ref);
     472                return rc;
     473        }
     474
     475        rc = ext4_filesystem_put_block_group_ref(bg_ref);
     476        if (rc != EOK)
     477                return rc;
    473478       
    474479        /* Try other block groups */
     
    540545                }
    541546               
    542                 block_put(bitmap_block);
     547                rc = block_put(bitmap_block);
     548                if (rc != EOK) {
     549                        ext4_filesystem_put_block_group_ref(bg_ref);
     550                        return rc;
     551                }
     552
    543553                ext4_filesystem_put_block_group_ref(bg_ref);
     554                if (rc != EOK)
     555                        return rc;
    544556               
    545557                /* Goto next group */
     
    576588        bg_ref->dirty = true;
    577589       
    578         ext4_filesystem_put_block_group_ref(bg_ref);
     590        rc = ext4_filesystem_put_block_group_ref(bg_ref);
    579591       
    580592        *fblock = allocated_block;
    581         return EOK;
     593        return rc;
    582594}
    583595
Note: See TracChangeset for help on using the changeset viewer.