Changeset 76b7622 in mainline for uspace/srv/fs/minixfs/mfs_balloc.c


Ignore:
Timestamp:
2011-07-25T20:26:13Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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.