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

Changeset 1494e52 in mainline


Ignore:
Timestamp:
2011-04-19T20:56:44Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
e5cebc9
Parents:
127d999
Message:

Fix dentry in-block offset calculation.

File:
1 edited

Legend:

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

    r127d999 r1494e52  
    6767
    6868        unsigned dentries_per_zone = sbi->block_size / sbi->dirsize;
    69         unsigned dentry_off = index % (dentries_per_zone - 1);
     69        unsigned dentry_off = index % dentries_per_zone;
    7070
    7171        if (sbi->fs_version == MFS_VERSION_V3) {
     
    177177
    178178        if (!empty_dentry_found) {
     179                mfsdebug("inode grow\n");
    179180                r = inode_grow(mnode, sbi->dirsize);
    180181                if (r != EOK)
    181182                        return r;
    182183
     184                mfsdebug("read dentry\n");
    183185                r = read_directory_entry(mnode, &d_info, i);
    184186                if (r != EOK)
    185187                        return r;
     188
     189                assert(d_info != NULL);
    186190        }
    187191
     
    191195
    192196        r = write_dentry(d_info);
     197        mfsdebug("write inode\n");
    193198        free(d_info);
    194199
Note: See TracChangeset for help on using the changeset viewer.