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

Changeset 76b7622 in mainline


Ignore:
Timestamp:
2011-07-25T20:26:13Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
936ece7
Parents:
b489f66
Message:

fix the inum index in the mfs_alloc_inode(), not in the alloc_bit function

File:
1 edited

Legend:

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

    rb489f66 r76b7622  
    5656mfs_alloc_inode(struct mfs_instance *inst, uint32_t *inum)
    5757{
    58         return mfs_alloc_bit(inst, inum, BMAP_INODE);
     58        int r = mfs_alloc_bit(inst, inum, BMAP_INODE);
     59
     60        *inum += 1;
     61        return r;
    5962}
    6063
     
    160163        chunk &= ~(1 << (idx % chunk_bits));
    161164        ptr[idx / chunk_bits] = conv32(sbi->native, chunk);
     165
    162166        b->dirty = true;
    163167        r = block_put(b);
     
    231235                /*Free bit found in this block, compute the real index*/
    232236                *idx = freebit + bits_per_block * i;
    233                 *idx += (bid == BMAP_INODE) ? 1 : 0;
    234237                mfsdebug("alloc index %d %d\n", (int) *idx, i);
    235238                if (*idx > limit) {
Note: See TracChangeset for help on using the changeset viewer.