Changeset 64e63ce1 in mainline for uspace/srv/fs/mfs/mfs_ops.c


Ignore:
Timestamp:
2013-07-11T09:35:48Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ba6651
Parents:
4c53333
Message:

mfs: try to restore a consistent filesystem status in case of error

File:
1 edited

Legend:

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

    r4c53333 r64e63ce1  
    419419        free(ino_i);
    420420out_err:
     421        mfs_free_inode(inst, inum);
    421422        return r;
    422423}
     
    674675                r = mfs_insert_dentry(child, "..", parent->ino_i->index);
    675676                if (r != EOK) {
     677                        mfs_remove_dentry(child, ".");
    676678                        destroy_dentry = true;
    677679                        goto exit;
     
    925927               
    926928                r = mfs_write_map(mnode, pos, block, &dummy);
    927                 if (r != EOK)
     929                if (r != EOK) {
     930                        mfs_free_zone(mnode->instance, block);
    928931                        goto out_err;
     932                }
    929933
    930934                flags = BLOCK_FLAGS_NOREAD;
Note: See TracChangeset for help on using the changeset viewer.