Changeset d2663d8 in mainline for uspace/srv/fs/mfs/mfs_balloc.c


Ignore:
Timestamp:
2013-09-13T16:02:09Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c5ba67
Parents:
cc8044e (diff), fd7dbbb (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:

merge mfs changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_balloc.c

    rcc8044e rd2663d8  
    8888{
    8989        int r = mfs_alloc_bit(inst, zone, BMAP_ZONE);
     90        if (r != EOK)
     91                return r;
     92
     93        /* Update the cached number of free zones */
     94        struct mfs_sb_info *sbi = inst->sbi;
     95        if (sbi->nfree_zones_valid)
     96                sbi->nfree_zones--;
    9097
    9198        *zone += inst->sbi->firstdatazone - 1;
     
    103110mfs_free_zone(struct mfs_instance *inst, uint32_t zone)
    104111{
     112        int r;
     113
    105114        zone -= inst->sbi->firstdatazone - 1;
    106115
    107         return mfs_free_bit(inst, zone, BMAP_ZONE);
     116        r = mfs_free_bit(inst, zone, BMAP_ZONE);
     117        if (r != EOK)
     118                return r;
     119
     120        /* Update the cached number of free zones */
     121        struct mfs_sb_info *sbi = inst->sbi;
     122        if (sbi->nfree_zones_valid)
     123                sbi->nfree_zones++;
     124
     125        return r;
    108126}
    109127
Note: See TracChangeset for help on using the changeset viewer.