Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 38224615 in mainline


Ignore:
Timestamp:
2011-07-16T22:42:43Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
44799a0
Parents:
367d67fe
Message:

Fix bug in alloc_zone() and free_zone functions which may cause data corruption.

File:
1 edited

Legend:

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

    r367d67fe r38224615  
    6363        int r = mfs_alloc_bit(inst, zone, BMAP_ZONE);
    6464
    65         *zone += inst->sbi->firstdatazone;
     65        *zone += inst->sbi->firstdatazone - 1;
    6666        return r;
    6767}
     
    7070mfs_free_zone(struct mfs_instance *inst, uint32_t zone)
    7171{
    72         zone -= inst->sbi->firstdatazone;
     72        zone -= inst->sbi->firstdatazone - 1;
    7373
    7474        return mfs_free_bit(inst, zone, BMAP_ZONE);
Note: See TracChangeset for help on using the changeset viewer.