Changeset 1412b7ee in mainline for uspace/lib/ext4/libext4_ialloc.c


Ignore:
Timestamp:
2014-02-01T21:46:42Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3eb0c85
Parents:
680708d (diff), 0dd022ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

mainline changes

File:
1 edited

Legend:

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

    r680708d r1412b7ee  
    204204                        rc = block_get(&bitmap_block, fs->device, bitmap_block_addr,
    205205                            BLOCK_FLAGS_NONE);
    206                         if (rc != EOK)
     206                        if (rc != EOK) {
     207                                ext4_filesystem_put_block_group_ref(bg_ref);
    207208                                return rc;
     209                        }
    208210                       
    209211                        /* Try to allocate i-node in the bitmap */
     
    215217                        /* Block group has not any free i-node */
    216218                        if (rc == ENOSPC) {
    217                                 block_put(bitmap_block);
    218                                 ext4_filesystem_put_block_group_ref(bg_ref);
     219                                rc = block_put(bitmap_block);
     220                                if (rc != EOK) {
     221                                        ext4_filesystem_put_block_group_ref(bg_ref);
     222                                        return rc;
     223                                }
     224
     225                                rc = ext4_filesystem_put_block_group_ref(bg_ref);
     226                                if (rc != EOK)
     227                                        return rc;
     228
     229                                bgid++;
    219230                                continue;
    220231                        }
     
    224235                       
    225236                        rc = block_put(bitmap_block);
    226                         if (rc != EOK)
     237                        if (rc != EOK) {
     238                                ext4_filesystem_put_block_group_ref(bg_ref);
    227239                                return rc;
     240                        }
    228241                       
    229242                        /* Modify filesystem counters */
     
    272285               
    273286                /* Block group not modified, put it and jump to the next block group */
    274                 ext4_filesystem_put_block_group_ref(bg_ref);
     287                rc = ext4_filesystem_put_block_group_ref(bg_ref);
     288                if (rc != EOK)
     289                        return rc;
     290
    275291                ++bgid;
    276292        }
Note: See TracChangeset for help on using the changeset viewer.